Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complete URL in a select tag?

Status
Not open for further replies.

vistor

Technical User
Dec 22, 2000
164
US
HI,

I have a page that has several topics, under each topic is a list of links, some external to the current site. The lists under each topic is getting rather long. Can I use a select list and how would I define the external links:

<form>
<select name&quot;religion&quot;>
<option value=&quot;a href= text
<option value=&quot;a href= text
</select>
</form>

?????
 
Try this:
Code:
<form>
<select name&quot;religion&quot; onChange=&quot;window.location.href=this.value&quot;>
<option value=&quot;&quot;>Choose one...
<option value=&quot;[URL unfurl="true"]http://whatever&quot;>Link[/URL] text
<option value=&quot;[URL unfurl="true"]http://whatever&quot;>Link[/URL] text
</select>
</form>
The values do NOT need the &quot;a href&quot;, just the url. You need the first option so that any destination they choose will be a &quot;change&quot; from what was already selected. Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
tsdragon,

This works in IE but not in Netscape. When I choose one Netscape returns an alert box:

unable to find file or directory named (link)/null

Is this because the page is still on the production server or just that Netscape does not support this action? When I type the URL in the browser location the site comes up fine, so I know the URL is correct. ??
 
I'm not sure what the problem with Netscape is. Perhaps someone who knows NS can help? I gave up testing for Netscape at least one version ago. I've found Javascript that NS doesn't do right even though I got it off their site and supposedly they invented it. My current attitude is if you use NS you deserve whatever you get. (I know I'm going to get flamed for that one!)

I used to be a dyed-in-the-wool NS fan, and an avid hater of IS, but that's completely reversed now. NS can't seem to keep up and IS seems to do everything better. Just my not-so-humble opinion.

BTW, I still think MS is big-brother a al 1984, but the alternatives are no better.
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top