954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Hyperlink POST using Javascript

I am trying to write a page that uses Javascript to post a variable to another page so that it does not appear in the address bar.

There are pages out there that almost do what I would like them to do, but are confusing... part of the reason for this is that I am new to Javascript.

The Problem:

I currently have a page named "Document List" that has a list of hyperlinks as follows:

Show Document 1
Show Document 2
Show Document 3
Show Document 4

I have read a post to these forums at http://www.daniweb.com/techtalkforums/thread32396.html , but it does not quite do what I am looking for because the "variable" value does not seem to be POSTED to the new page.

So the end game here is to replace these hyperlinks with some mechanism (Forms or otherwise) to avoid the situation that a user replaces the "variable" value in the address bar. Javascript seems to be able to do it, but I cannot seem to get the thing to work.

Are you able to assist?

Thank you in advance

alphabravo
Newbie Poster
1 post since May 2006
Reputation Points: 10
Solved Threads: 0
 

The only way to do a POST is to submit a form. JavaScript can do that, with the Form.Submit() method. JavaScript can also be used to set the values of the form elements to be posted.

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You