473,414 Members | 1,729 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,414 software developers and data experts.

How to append more than one variable with value to url in javascript

25
I am trying to append more than one variable-value pair to URL in javascript.

my url is "myurl.com?file1.php"+"?p="+acthf.value+'&q='+ inacthf.value+'&r='+dishf.value

I am getting it with one value but fails with two more.
Mar 4 '10 #1
2 1505
RamananKalirajan
608 512MB
Hi Rushi,
In the url, only once the question mark (?) should come. and more over the parameter should be in key value pair and it should be seperated by "&"

sample url:

http://www.example.com?parameterName...arameterValue3

Thanks and Regards
Ramanan Kalirajan
Mar 4 '10 #2
Dormilich
8,658 Expert Mod 8TB
@RamananKalirajan
actually, that’s not true. the usage of "&" is correct. if you serve XHTML documents, it even is the only way to go, since everything else will throw an "unknown entity" error.

however it is recommended to encode the parameter values using encodeURIComponent().
Mar 4 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Donna Hawkins | last post by:
I want to use javascript to redirect to a URL which has been passed as a variable (in php). I have searched but cannot find any solution. I think this code is a basic redirect: <script...
11
by: dhplank | last post by:
Hello everyone, I've developed a calendar program in javascript, and up until now I've done most of my testing using Mozilla and Firefox. Everything works fine, but when I try to use Internet...
6
by: Simon | last post by:
Hi folks, I'm aware of the fact that using a StringBuilder is more efficient than constantly reassigning a string. For example. Example A --------- SringBuilder sb = new StringBuilder();...
3
by: barry | last post by:
I have the following: function(NAMED) { sString.Append("document.forms.NAMED.style.visibility = 'hidden'") } and would like to convert the NAMED into the object it represents - for example in...
4
by: Sandro Dentella | last post by:
I'd like to understand why += operator raises an error while .append() does not. My wild guess is the parses treats them differently but I cannot understand why this depends on scope of the...
5
by: jimFDAC | last post by:
Hi- I would like to extract a value from the displayed url in the address, i.e. the 222 from http://www.virtual.com/test.htm?sid=222 I now need to hold that value in a variable var XXX= 222...
3
by: Freddy Coal | last post by:
Hi, I would like append strings to a binary file, but I don´t understand how make that. I try with: FileOpen(1, Folder_Trabajo & "\Toma_Trazas.FC", OpenMode.Append, OpenAccess.Write,...
12
by: vj | last post by:
I am using Borland C++. I run a program which generates output data files, say 'Voltage.dat', 'Current.dat'. I have a variable in my code (say N), and for various values of N (for each value of...
1
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause...
2
by: bashhead | last post by:
Hi all, I have a basic shell script question. Say I have a variable called test. I already have a value in test = 'monkey' How do I append another value taken from a file, to this variable?...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.