HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 6th, 2013, 12:58 PM
ashfaq ashfaq is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 1 ashfaq User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 50 sec
Reputation Power: 0
New Member - I want to add a link in option tag but i cant please some 1 help me its urgent

</div><!--/ Codrops top bar -->
<header class="clearfix">
<h1>Simple Effects<span>for Drop-Down Lists</span></h1>
<nav class="codrops-demos">
<a class="current-demo" href="index.html">Demo 1</a>
<a href="index2.html">Demo 2</a>
<a href="index3.html">Demo 3</a>
<a href="index4.html">Demo 4</a>
<a href="index5.html">Demo 5</a>
<a href="index6.html">Demo 6</a>
</nav>
</header>
<section class="main clearfix">
<div class="fleft">
<p>In this example we use a gutter of 5 and stack the items with a slight offset</p>
</div>
<div class="fleft">
<select id="cd-dropdown" name="cd-dropdown" class="cd-select">
<option value="-1" selected>Choose your favorite animal</option>
<option value="1" class="icon-monkey">Monkey</option> <option value="2" class="icon-bear">Bear</option>
<option value="3" class="icon-squirrel">Squirrel</option>
<option value="4" class="icon-elephant">Elephant</option>

</select>
</div>

Reply With Quote
  #2  
Old February 7th, 2013, 01:02 AM
simplypixie simplypixie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 104 simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 18 h 33 m 57 sec
Reputation Power: 11
Sorry but you can't add links to the option tag

Reply With Quote
  #3  
Old February 7th, 2013, 03:08 PM
PatJarl PatJarl is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 1 PatJarl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 38 sec
Reputation Power: 0
Oh, yes you can!

Quote:
Originally Posted by simplypixie
Sorry but you can't add links to the option tag


You can actually add links to the option tag. All it takes is some javascript.

Read the top rated answer here and you will get your links added.

Code:
http://stackoverflow.com/questions/2000656/using-href-links-inside-option-tag

Last edited by ishnid : February 8th, 2013 at 02:22 AM. Reason: Removed somewhat impolite opening.

Reply With Quote
  #4  
Old February 8th, 2013, 08:43 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,894 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 2 Days 19 h 44 m 32 sec
Reputation Power: 4192
Are you aware that "jump boxes" cause problems for some users? I recommend you try to find an alternative.
More information:
Drop-Down Menus: Use Sparingly
Creating Accessible Forms: JavaScript jump menus
Accessible JavaScript onchange select menu
WAC Tutorials: Jump Menu
Unobtrusive Jump Menus Using JavaScript

Quote:
Originally Posted by PatJarl
You can actually add links to the option tag. All it takes is some javascript.

Read the top rated answer here and you will get your links added.

JavaScript can make them act like links, but they aren't links, so what simplypixie said is true although it doesn't mention the workaround.
__________________
Spreading knowledge, one newbie at a time. I'm available for hire at Dynamic Site Solutions.

Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

Remember people spend most of their time on other people's sites (so don't violate web design conventions).

Reply With Quote
  #5  
Old February 9th, 2013, 01:47 AM
simplypixie simplypixie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 104 simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 18 h 33 m 57 sec
Reputation Power: 11
I agree - my answer was very short and to the point and I should have mentioned that javascript or jquery can be used to 'simulate' links on selection of an option.

Reply With Quote
  #6  
Old February 9th, 2013, 12:25 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,894 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 2 Days 19 h 44 m 32 sec
Reputation Power: 4192
Quote:
Originally Posted by simplypixie
javascript or jquery can be used to 'simulate' links on selection of an option.

jQuery is JavaScript. It's a great library but it's one of many JavaScript libraries.

Reply With Quote
  #7  
Old February 9th, 2013, 12:32 PM
simplypixie simplypixie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 104 simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level)simplypixie User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 18 h 33 m 57 sec
Reputation Power: 11
Quote:
Originally Posted by Kravvitz
jQuery is JavaScript. It's a great library but it's one of many JavaScript libraries.

Yes I know that However the OP might want to do it with plain JS or use the jQuery library which is why I said either or.

Reply With Quote
  #8  
Old February 28th, 2013, 11:01 PM
pinkzebradesign pinkzebradesign is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 14 pinkzebradesign User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 7 m 40 sec
Reputation Power: 0
Steal from the Best

Best way is to copy the full code and paste it on google or some other website... that you can find very easily... then website will automatically search out the errors.... its very helpful for the newbies....

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > New Member - I want to add a link in option tag but i cant please some 1 help me its urgent

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap