Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 10-22-2008, 09:48 AM Jump Menu Variables
lothop's Avatar
Ultra Talker

Posts: 303
Trades: 0
Hey, I'm using a jump menu on my website.
I was wondering if I could assign a specific variable?


Code:
<script>
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<select name="jumpMenu" class="forms" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
    <option value="">Select Day</option>
    <option value="project.allocate.php">Friday</option>
</select>
I was wondering if I could send the variable "friday" so that the php site could store it.

Im not asking for help with the php, but sending the variable VIA the form.

Umm, I know I could possibly have the link as "project.allocate.php?option=Friday", is there any other way?

Im always interested in learning different ways to do things.
If anyone knows please leave a message
Thanks
__________________
Websites Created;
warscope.com
ratepayers.org.nz
lothop is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-22-2008, 10:42 AM Re: Jump Menu Variables
angele803's Avatar
Perfectly Imperfect

Posts: 1,772
Name: Stephanie
Location: Oklahoma
Trades: 2
You can pass a variable through the form using a hidden form field.
So just add something like this to the form:

Code:
<input type="hidden" name="day" value="friday"  />
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 10-23-2008, 07:59 PM Re: Jump Menu Variables
lothop's Avatar
Ultra Talker

Posts: 303
Trades: 0
But what if I have another jump menu option which is "Tuesday" ?

Code:
<select name="jumpMenu" class="forms" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
    <option value="">Select Day</option>
    <option value="project.allocate.php">Friday</option>
    <option value="project.allocate.php">Thursday</option>
</select>
Because the hidden form wouldnt know which option had been picked.
__________________
Websites Created;
warscope.com
ratepayers.org.nz
lothop is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Jump Menu Variables
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28778 seconds with 12 queries