This wasn't my script I was modifying. For some reason they don't want
one field to show up in the querystring when it is sent to the page...
Even if it is empty...
http://www.postedpage.com/index.asp?...econdvalue=432
They wouldn't want myfirstvalue showing up at all in the first clicked
link even if there is no value...
Basically they used each anchor tag within a form to call a javascript
function through its onclick event. Some of these anchor tags would
read a value from an input box in the form and also append values
through the javascript using createElement. Then post the form with
the added elements through javascript. So the input box would get
posted along with all the created elements because it was part of the
orinal form. They were using something like this for that one link in
particuar....
the function()
{
var input;
if (document.createElement) {
input = document.createElement('input');
input.type = 'hidden';
input.name = 'NewParameter';
input.value = 'TheParamValue';
oparent.appendChild(input);
document.form1.elementIDontWant.value = "";
}
document.form1.action="http://www.myurl.net/index.asp";
}
.... To submit the form along with its newly created elements in
javascript. All called through the onclick event... You can see they
blanked out the value but it doesn't get rid of the actual name of
the form element in the querystring.
But for one link they didn't want to post the input box param along
with the created element. Strange way of doing it seems but that is
what they did. That is why I removed the input box using removeChild
in the javascript for that one link click...
I just thought there had to be a better way of doing it... Personally
this is not how I would have gone about it. But I'm not a javascript
expert.