Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a value from an url

Status
Not open for further replies.

d1004

Programmer
May 9, 2002
78
US
url = I've tried to put the following code into my html page, but it is not showing up.

This is index.htm

<script Language=&quot;JavaScript&quot;>
var qry = location.search
var qrytextnosplit = qry.substring(1)
var qrytext = qry.substring(1).split(&quot;=&quot;)
</script>


This is nextpage.htm

<script Language=&quot;JavaScript&quot;>
var displayname=parent.qrytext;
document.write(&quot;<b>Your name is:</b> &quot;+displayname);
</script>


And the displayname variable is displaying as:
Your name is: Name=Michael,Smith%20M

And I want to take out the Name= and %20...So what left is just the name. But I can't seem to get it to split.
Thank you,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top