WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Drop down with option to appear on Wed Jul 07, 2010 10:49 pm

Guest


Guest
can someone give me a drop down menu and when you select something a text appears next to it?
thanks

2 Re: Drop down with option to appear on Wed Jul 07, 2010 10:54 pm

Drogba921


Registered Member
Registered Member
Code:
<form name="YOUR TEXT" action="URL" method="POST">
<div align="center">
<select name="TEXT HERE">
<option value="TEXT HERE">TEXT HERE</option>
<option value="TEXT HERE">TEXT HERE</option>
<option value="TEXT HERE">TEXT HERE</option>
</select>
</div>
</form>

Option value="TEXT HERE" wont be visible. The text between tags will be.

http://www.codinghelp.org

3 Re: Drop down with option to appear on Wed Jul 07, 2010 11:03 pm

Guest


Guest
its what i want but i want to appear a text when i choose an option

4 Re: Drop down with option to appear on Wed Jul 07, 2010 11:04 pm

Drogba921


Registered Member
Registered Member
Cool-Processor wrote:its what i want but i want to appear a text when i choose an option

You could link the text to a pop up.

http://www.codinghelp.org

5 Re: Drop down with option to appear on Thu Jul 08, 2010 1:48 am

Unknown Data

avatar
Registered Member
Registered Member
Try this out. It should work if I understand what you're saying. Wink

Code:
<select name="searchin" onchange="document.getElementById('ExtraInfo').firstChild.nodeValue = this.options[this.selectedIndex].extrainfo">
<option value="1" extrainfo="Option 1 text">Option 1</option>
<option value="2" extrainfo="Option 2 text">Option 2</option>
<option value="3" extrainfo="Option 3 text">Option 3</option>
<option value="4" extrainfo="Option 4 text">Option 4</option>
<option value="5" extrainfo="Option 5 text">Option 5</option>
</select>

<div id="ExtraInfo">Select option</div>

http://woops.dk

6 Re: Drop down with option to appear on Thu Jul 08, 2010 2:19 am

Guest


Guest
i use it but when i select option 1 it says "undified"? ??

7 Re: Drop down with option to appear on Thu Jul 08, 2010 4:04 am

Unknown Data

avatar
Registered Member
Registered Member
It's working fine here.
Which browser are you using (I'm using IE)?

http://woops.dk

8 Re: Drop down with option to appear on Thu Jul 08, 2010 3:35 pm

Guest


Guest
Safari and Firefox:(

9 Re: Drop down with option to appear on Thu Jul 08, 2010 8:39 pm

ankillien

avatar
Administrator
Administrator
Hey,
This code should do the trick...

Code:
<select name="searchin" onchange="document.getElementById('ExtraInfo').firstChild.nodeValue = this.options[this.selectedIndex].value">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="4">Option 4</option>
<option value="5">Option 5</option>
</select>

<span id="ExtraInfo">Select option</span>

Note that it will display the text which is defined in the value="" attribute. It won't show the text which is between option tags.

Hope it helps Very Happy

10 Re: Drop down with option to appear on Thu Jul 22, 2010 8:02 am

Terry Harvey

avatar
Registered Member
Registered Member
I'm not sure what you are asking for, do you have a link to such a thing?

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum