0

Actually, I have already asked this question here: jQuery simple Data Pass HTML

I have 1/2 achieved my goal, I am using window.location.href to pass the variable "VISITORNAME" the Url looks http://myurl/sent#[email protected] (VISITORNAME)

then I used window.location.href.replace to get [email protected] (VISITORNAME)

how possible to make url like static, just like http://myurl/sent but still passing the value to another page.

2 Answers 2

3

Instead of GET you can use POST to pass the parameters..

By doing so the parameters will not be reflected in the url..

Try this approach

$.post('http://myurl/sent',{ email : VISITORNAME });
Sign up to request clarification or add additional context in comments.

1 Comment

after POST, do I still use the way window.location.href to GET. thanks
0

To keep your URL simple and clean you would need to change your form method from get to post. However, you'd need to be aware of limitation on how that would affect users hitting the refresh button, bookmarking, etc.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.