473,386 Members | 1,830 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.

prepare URI for multiple values with same parameter name.

dmjpro
2,476 2GB
I want to prepare a URI having a parameter name which contains multiple values.
How do I prepare that URI in JS?
I mean how browser send those multiple values?
Please Help me!

Debasis Jana.
Jul 5 '08 #1
5 2333
hsriat
1,654 Expert 1GB
How do you want to send those parameters?
If you are using AJAx for the same, use a variable the required URI and pass it to the xmlHttp.open function or in other case, use window.location = uri_variable;.
Expand|Select|Wrap|Line Numbers
  1. var uri_variable = 'mysite.com/index.php?a=' + a + '&b=' + b;  
Jul 5 '08 #2
dmjpro
2,476 2GB
How do you want to send those parameters?
If you are using AJAx for the same, use a variable the required URI and pass it to the xmlHttp.open function or in other case, pass this as an argument to window.location function.
Expand|Select|Wrap|Line Numbers
  1. var uri = 'mysite.com/index.php?a= ' + a + '&b=' + b;  
Now Suppose .... i want to send multiple values against parameter "a".
So that i can use "request.getParameterValues" (for JSP).
You got what i meant?

Debasis Jana
Jul 5 '08 #3
dmjpro
2,476 2GB
Now Suppose .... i want to send multiple values against parameter "a".
So that i can use "request.getParameterValues" (for JSP).
You got what i meant?

Debasis Jana
I got the solution, what a fake question i made.
it will be page?parameter_name=parameter_value&parameter_name =parameter_value......
actually i got from my self ..simply make the request GET and ..submit the page ..and have a look at the address bar of the browser.

Debasis Jana .... So shamed of me!
Jul 5 '08 #4
hsriat
1,654 Expert 1GB
I got the solution, what a fake question i made.
it will be page?parameter_name=parameter_value&parameter_name =parameter_value......
actually i got from my self ..simply make the request GET and ..submit the page ..and have a look at the address bar of the browser.

Debasis Jana .... So shamed of me!
In JSP and ASP, multiple GET variables with same name makes an array at the server end.
In PHP, square braces, [ ] are needed (like variable[ ]) to make it an array.
Jul 5 '08 #5
acoder
16,027 Expert Mod 8TB
I got the solution, what a fake question i made...[snip]... So shamed of me!
Not necessarily. Sometimes, by typing out your problem, it let's you think about it more and you figure it out yourself.
Jul 5 '08 #6

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

Similar topics

2
by: claus.hirth | last post by:
I wrote a stored procedure that uses a prepared INSERT INTO statement in order to play with the PREPARE and EXECUTE keywords. In transcript 1 below the call to that stored procedure does not...
0
by: RG | last post by:
OleDbCommand.Prepare error: Size of parameter (VB.NET 2003) I need to do a SQL INSERT statement into an Access table, and I’d like to use the exact technique described in the Help file example...
1
by: Purple-D | last post by:
Hi All, I came across a weird situation today. We have a simple sql statement with some java code thrown around it which executes in about 1-2 seconds. However when put in input parameter...
6
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.