reference current value in menu when changing url

I'm using a menu to change the URL of the user's browser.  the menu is part of a PHP app and needs to pass parameter value pairs to the page that is opened.  problem that I'm having is that one of the values required is the value of the menu that is calling the MM_goToURL() fucntion (I need the value that the user is changing the menu to be part of the URL passed to the function).

this is the function that is changing the URL:

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() {
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>

this is the code that is associated with the <select> element of the form:

<select name="task_order_list" id="task_order_list" onChange="MM_goToURL('parent','/usability/custom_functions/function_lib.php?site_id=2&amp;task_id=48&amp;old_task_order=1&amp;new_task_order=task_list');return document.MM_returnValue">

                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="1"SELECTED>1</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                    </select>
 where you see :
new_task_order=task_list
I need the value that the menu has been changed to in place of 'task_list'

I know (assume) I can reference this through the DOM, but don't know how.

cheers,
shotokaiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mr_egyptianCommented:
I think this is what you're  looking for. I modified things a bit to make life easier:

<script language="JavaScript" type="text/JavaScript">
<!--

function MM_goToURL() {
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  sel=args[2].options[args[2].selectedIndex].value;
  args[1]+='new_task_order='+sel;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

//-->
</script>
 </head>
<body>
 <select name="task_order_list" id="task_order_list" onChange="MM_goToURL('parent','/usability/custom_functions/function_lib.php?site_id=2&amp;task_id=48&amp;old_task_order=1&amp;',this);return document.MM_returnValue">
  <option value="2">2</option>
  <option value="3">3</option>
  <option value="1"SELECTED>1</option>
  <option value="4">4</option>
  <option value="5">5</option>
 </select>
</body>
</html>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
shotokaiAuthor Commented:
perfect! thx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.