...

View Full Version : how to pass more than 1 parameter using location.href



tllcll
10-21-2005, 10:48 AM
I would like to know how to pass more than 1 parameter/value using location.href

eg:
onchange='location.href='second.jsp?field1='+this.value"

PhotoJoe47
10-21-2005, 11:23 AM
I would like to know how to pass more than 1 parameter/value using location.href

eg:
onchange='location.href='second.jsp?field1='+this.value"

What is intented use of this extra parameter/value that you want to past?

The location object represents the current web address displayed in the browser. The herf property of the location object represents the complete URL.

Now there are other properties of the location object that represents small parts of the complete URL.

PhotoJoe

mlse
10-21-2005, 12:12 PM
tllcll - you could just do something like:

location.href='mypage.php?a=1&b=2&c=3&d=4';

Kor
10-21-2005, 01:09 PM
You just must be careful about what separator you are using and which kind of language/application server uses.

For a php page, for instace I have succesfully used # as separator



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum