I have a page that has two select boxes. Each of these select boxes has an event handler "onChange()". This event handler calls a javascript function to submit the page (meaning, each time the user selects a new item in the list, the page is submitted).
How do I set this up so that on the action page, I can tell which select list was the one that was submitted. Here is what I have:
<script LANGUAGE=JAVASCRIPT>
<!--
function SubmitName()
{ document.forms[0].submit(); }
function SubmitLUA()
{ document.forms[0].submit(); }
//-->
</script>
The problem is, I need to be able to pass some kind of switch or variable so that on the action page, I know if the function SubmitName or SumitLUA was used.
I initially tried to do something like the following:
<script LANGUAGE=JAVASCRIPT>
<!--
function SubmitName()
{ window.location.href="index.cfm?fuseaction=Action&Sub=1"; }
function SubmitLUA()
{ window.location.href="index.cfm?fuseaction=Action&Sub=2"; }
//-->
</script>
This way, based on the value of 1 or 2, I can tell how it was sent to this page. The problem is, this doesn't SUBMIT the page. I need the page submitted.
So, what I need to figure out is how to SUBMIT the page, and also pass some kind of value to the action page to determine how it was submitted.
Any help is much appreciated. Thanks!
How do I set this up so that on the action page, I can tell which select list was the one that was submitted. Here is what I have:
<script LANGUAGE=JAVASCRIPT>
<!--
function SubmitName()
{ document.forms[0].submit(); }
function SubmitLUA()
{ document.forms[0].submit(); }
//-->
</script>
The problem is, I need to be able to pass some kind of switch or variable so that on the action page, I know if the function SubmitName or SumitLUA was used.
I initially tried to do something like the following:
<script LANGUAGE=JAVASCRIPT>
<!--
function SubmitName()
{ window.location.href="index.cfm?fuseaction=Action&Sub=1"; }
function SubmitLUA()
{ window.location.href="index.cfm?fuseaction=Action&Sub=2"; }
//-->
</script>
This way, based on the value of 1 or 2, I can tell how it was sent to this page. The problem is, this doesn't SUBMIT the page. I need the page submitted.
So, what I need to figure out is how to SUBMIT the page, and also pass some kind of value to the action page to determine how it was submitted.
Any help is much appreciated. Thanks!