473,386 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Some values being changes when passing through URL

Hi,
i am trying to pass values to a struts action using javascript. It
works fine until the value has something like '+' or '&' sign in it.
Is this a problem with javascript or these values cannot be passed in
the URL ?

takeExample.do?field='+field+'&Code='+code

this is the url im making

if code is 'trying + something else'
i get 'trying something else' from the request.getParameter

if it is 'trying & something else'
i get 'trying '
Please Help
Thnax in advance
Jul 23 '05 #1
2 1060
"sancha" <ch**************@gmail.com> wrote in message
news:a9**************************@posting.google.c om...
Hi,
i am trying to pass values to a struts action using javascript. It
works fine until the value has something like '+' or '&' sign in it.
Is this a problem with javascript or these values cannot be passed in
the URL ?

takeExample.do?field='+field+'&Code='+code

this is the url im making

if code is 'trying + something else'
i get 'trying something else' from the request.getParameter

if it is 'trying & something else'
i get 'trying '
Please Help
Thnax in advance


Look into JavaScript's escape() and unescape():

http://www.devguru.com/Technologies/...ef/escape.html
http://www.devguru.com/Technologies/.../unescape.html
Jul 23 '05 #2
On Wed, 05 Jan 2005 11:12:57 GMT, McKirahan <Ne**@McKirahan.com> wrote:

[snip]
Look into JavaScript's escape() and unescape():


The escape and unescape functions are deprecated. They are also
inappropriate when not applied to the entire URL (as in this case).

See my post to the earlier incarnation of this thread.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: cgplays.com | last post by:
I have a select-pulldown at http://computergroupplays.com/fb-pres2.asp that changes the 3rd pulldown (Dbase) depending on what the user enters in the 2nd (Wk). My associate wants the values inside...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
10
by: Charles A. Lackman | last post by:
Hello, I have been working with an application that sends a dataset to other forms that are called from individual DLL's. I have noticed that, a dataset that is passed to another form, when...
17
by: Roland Hall | last post by:
Is there a way to return multiple values from a function without using an array? Would a dictionary object work better? -- Roland Hall /* This information is distributed in the hope that it...
4
by: Dr. David Kirkby | last post by:
I have a program that loops through and changes all the elements on an array n times, so my code looks like this: for (n=1; n < n_max; ++n) for(i=imax; i >= 0; --i) { for(j=0 ; j < jmax; ++j) {...
7
by: Rano | last post by:
/* Hello, I've got some troubles with a stupid program... In fact, I just start with the C language and sometime I don't understand how I really have to use malloc. I've readden the FAQ...
5
by: Miguel Dias Moura | last post by:
Hello, i have an ASP.net / VB page with a Script (submitValues) and a Form. 1. The form has 20 input texts and a "Submit" button. 2. The script declares 20 variables. The value of each...
16
by: Richard | last post by:
Hi, I am passing a structure to a subroutine where the passed parameter has been declared as ByVal. However, changes made to the passed variable inside the subroutine flow through to the...
23
by: Bob Hollness | last post by:
Hi all. I know this is basic but it is something that i have never learnt! I have a function that returns a True or False to the Sub. But what i actually want to do is return True or False and...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.