Mica said:
Is calling someone stupid by Randy Webb condoned then?
Randy Webb-No, you just think you do.
Because thats what he did! I did not make a mistake in my statement.
I need to pass info in a js submit. I suspected this was not a common
thing so I turned to the newsgroup. What I got was rudeness,
judgement, and general ill manners. I am not a newbie or a student
and have been using newsgroups for over 10 years. Read the posts. You
are lecturing the wrong person.
I guess this can't be done by anyone here. Instead of creative help,
I got dumped on. I didn't want to create dynamic buttons tied to
hidden data but it will work even if its ugly.
Of course it can be done!
We only try to tell you that it is unneccessary complex and fragile
compared to the normal, standard way of just submitting a form.
The point that you don't understand what we mean because you have
your mind set on that it can't be done is a completely different question!
* If you want to use submit, that implies a <form> element.
* When a form is submitted, it is the content of the <input>, <select>
and other form fields that is _automaticlly_ submitted.
* whatever data you want to send to the server *must* be in one
of the form fields to be sendt by the form submission.
* If you want to send some additional data, depending on, ie. where
the user clicked, you use JS to set the content ao a hidden <input>
field before you execute submit.
* you can also of course send the content of several input fields
by clicking a link <a>, without having a form element at all.
_But then we're not talking about submitting at all!_
It is then a qouestion of building a request-string manually,
append it to the url, and forward. (see below):
function linkClicked(sender) {
var x1 = document.getElementById("x1").value;
var x2 = document.getElementById("x2").value;
var sId = sender.id;
var url = "receivingPage.php?x1=" + x1 + "&x2=" + x2 + "&linkId=" + sId;
window.location.href = url;
return false;
}
...
<a id="a1" href="NoJS.html" onclick="linkClicked(this); return
false;">Link a1</a>
* I asked you a list of specific questions regarding your requirements
in response to your post 2006-06-30 14:58:00 UTC+2, but you have still
not responded.
* When so many people ask questions about your approach, and show confusion
about what you are trying to achieve, you *might* consider that what you
think is a brilliant explanation was noting but confusing to the rest of
the
world...
* Answer my questions from the 30th, and stop whining, and I'll still help
you.