Getting the submitted fields in a form
I am trying to display a links bar which contains the links that the user has visited. I am using Javascript here. I have a function called addLink which takes name and the URL as parameters. Every page that is visited by the user would add itself to the links bar by calling addLink.
The problem that I am facing is to find out the URL by which the page is getting loaded. In our system, few pages use GET and few other pages use POST. In case of a page loaded by using GET, document.location.href helps me to get the URL. But I don't know how I would access the parameters that are submitted by form submission. In fact, we don't have any submit button in our pages. We just have links which are calling some Javascript function, which then submits the form. I think that we can capture the form parameters and create an URL. But I am not sure whether this is the right way to do it, and whether it would work?
|