|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I want to be able to process parameters passed along with the url. Something like:
http://www.thispage.com/help?topic=browsing The only ways I currently know how to process the parameters are using a custom CGI script or some server application like ColdFusion. Is there a way to access this via Javascript? Or even something simpler? Thanks! ------------------ Dan Gilbert dan@26thavenue.com http://www.26thavenue.com |
|
#2
|
|||
|
|||
|
Sure, all you are doing is setting a variable and giving it a value, which can be accessed in Javascript, or in server-side scripting.
So when the browser calls this URL: http://www.thispage.com/help?topic=browsing The variable "topic" now has the value "browsing", which you can now proceed to use in any way you want. In Javascript inside that page you could do document.write(topic) and the browser would print out browsing |
|
#3
|
|||
|
|||
|
Hello..
An alternate means to process URL parameters is with XSSI - which is very browser-independent. For more information on XSSI, WebMonkey holds a great tutorial on it at http://hotwired.lycos.com/webmonkey...html?tw=backend Good Luck! Josh http://www.datera.com |
|
#4
|
|||
|
|||
|
Hi, i am new in javascript
How about passing a javascript variable to the url?? something like... mypage.html?name=username&id=userdi can any one help?? |
|
#5
|
|||
|
|||
|
Does anyone know if this can be done in PHP3 too?
It would help me a lot... |
|
#6
|
|||
|
|||
|
Of course it can be done in PHP. Just try it and see.
test.php3: <?php echo $testvariable; ?> open http://yourserver/test.php3?testvariable=Hello+World! |
|
#7
|
|||
|
|||
|
mfkoo:
You can pass variables between pages using location.search An example: if you call a page with a javascript generated link like: <a href="Profile.htm?Name='Peric Ofpalots';Gender='male';Age=15">View your profile</a> Profile.htm must have this code inside the <SCRIPT> tag: eval(location.search.substring(1)); this creates the variables Name,Gender & Age (if they were'nt defined) and puts the specified information inside them. |
|
#8
|
|||
|
|||
|
You can find a tutorial on sending objects from page to page via Javascript here:
http://www.wsabstract.com/javatutors/send1.shtml Spookster ------------------ Visit the WSAbstract Help Forum for your Javascript, DHTML, or General Web Design Questions |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Reading URL parameters... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|