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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the URL and adding a string

Status
Not open for further replies.

againstTheWind

Programmer
Jun 22, 2006
42
US
I am trying to call a function once a form is submitted that will change the current URL to a new URL that includes an additional parameter at the end.

Here is what I have

Code:
function ResInquiryTrack()
{
	location.replace(location.href + 'FBinquiry=1')
	
}

However, it is not working. Any ideas?
 
You must delimit querystring values with an ampersand. Try this instead:

Code:
function ResInquiryTrack()
{
    location.replace(location.href + '[!]&[/!]FBinquiry=1')
    
}

note: this assumes you already have querystring values, if none exist, then you must put a question mark first - as it signifies the start of the first querystring value

-kaht

Looking for a puppy?

[small]Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top