-
click and drop to the form
I have a drop down menu for luch choices. when the customers click on one of the tiltes, like say lunch, then a pop up box will show different lunch selection. I know how to do the pop up, Now I want to know how to do it when the customers click on one of the selections, the selected lunch will drop to the form that the customers are filling.
Any help will be greatly apprecaited.
Thanks
-
-
This is done with Javascript.
What you need to do is this:
1. Determine when the perform the action. The best option you have is probably onChange, and you can do it like this:
<select onChange="changeit()">
2. Now, you need to make the other one change: you can do that by getting the value of the first input (document.forms......value) and then setting the value of the other menu to that value. If this is happening in different windows it will be more complex, and you will have to use probably parent. instead of document. to find the input on the other page.
If you post a bit more information, or hopefully a link to your page, we can be more specific.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
Thank you very much for the reply.
I am using this as the drop down menu,
unction land(ref, target)
{
lowtarget=target.toLowerCase();
if (lowtarget=="_self") {window.location=loc;}
else {if (lowtarget=="_top") {top.location=loc;}
else {if (lowtarget=="_blank") {window.open(loc);}
else {if (lowtarget=="_parent") {parent.location=loc;}
else {parent.frames[target].location=loc;};
}}}
}
function jump(menu)
{
ref=menu.choice.options[menu.choice.selectedIndex].value;
splitc=ref.lastIndexOf("*");
target="";
if (splitc!=-1)
{loc=ref.substring(0,splitc);
target=ref.substring(splitc+1,1000);}
else {loc=ref; target="_self";};
if (ref != "") {land(loc,target);}
}
<form action="search" method="post">
<select name="choice" size="1" onchange="jump(this.form)" >
<option value="">List </option>
<option value="{$base_dir}1.html" >First</option>
<option value="{$base_dir}2.html">Second</option>
<option value="{$base_dir}3.html">Third</option>
</select><form action="search" method="post">
</form>
I am still in the local stage. I can show you an image about what I want. I want when the customers click on the lunch drop down selection, then they just click on the selection, and it will drop to the form name"I want"
Thank you again for the help.
Jack
-
-
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks