just another thing.. for people who are trying to replace a url outside
of a form and who are searching for an answer - when you are trying to
use the document.locati on.replace("") method for going to another url,
you have to put false on the end of your return statement and call the
function in the form of:
onsubmit="retur n(make_url());"
Why? Apparently there is an 'event bubble' that happens when you are
doing a POST method call, which proceeds to overwrite your hand-crafted
url with the contents of the form, which causes it to revert back to
the old, pre-document.locati on.replace("") value (and cause you to lose
much hair from pulling in the process).
Anyways,
return false;
at the end of make_url() seems to short-ciruit this from happening.
What an annoying behaviour - that's 1 1/2 hours down the drain right
there. Who designed this language anyway?
Ed
of a form and who are searching for an answer - when you are trying to
use the document.locati on.replace("") method for going to another url,
you have to put false on the end of your return statement and call the
function in the form of:
onsubmit="retur n(make_url());"
Why? Apparently there is an 'event bubble' that happens when you are
doing a POST method call, which proceeds to overwrite your hand-crafted
url with the contents of the form, which causes it to revert back to
the old, pre-document.locati on.replace("") value (and cause you to lose
much hair from pulling in the process).
Anyways,
return false;
at the end of make_url() seems to short-ciruit this from happening.
What an annoying behaviour - that's 1 1/2 hours down the drain right
there. Who designed this language anyway?
Ed
Comment