Click to See Complete Forum and Search --> : REAL easy one...
mawood
02-05-2003, 08:18 AM
I CANT REMEMBERRR!!!! So agrevated am I.
How can I view an alert window that contains the URL string of a form submission before the submission actually happens?
Are you looking for something like this...
<input type="submit" onSubmit="test()">
and in you <head>
<script type="text/javascript">
function test()
{
alert("testing");
}
</script>
mawood
02-05-2003, 08:26 AM
No, sir. A form submission string looks something like:
http://www.site.com/file.jsp?firstfield=one&secondfield=two&thirdfield=three
I simply need to view an alert window with this information before actual submission.
Something like:
seeit = document.formName.value;
alert(seeit);
but 'value' is not the right word.
mawood
02-05-2003, 08:27 AM
my url string wasn't supposed to be a link.
I can see what you mean. I can think of one way to do it, but it would not be easy...and I'm not sure how well (bug-free) it would work. :(
mawood
02-05-2003, 08:40 AM
Darn! So I guess this means I there isn't a path like document.formName.value to get the forms entire value like you can get the value of a field by document.formName.fieldName.value? If not, I can loop through the elements to do the functionality, but that won't work for what I am doing. If it is true that a 'document.formName.value' approach isn't included in JavaScript, then I will have to forget this attempt. Its just for testing purposes anyway.