Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: irt.org FAQ Knowledge Base Q203

irt.org | About | Feedback | 2126 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q203

Sent by
alex on December 10, 2000 at 15:20:15:

Worth:
Very worth reading

Comments:
--resubmit after removing comment tags from script...
I spent several days trying to figure out how to do this right. I'm populating a dropdown with access database field and ended up using something similar to your solution, but it doesn't completely work. it's fine until the database field contains a space in it, then it just freezes in ie5.5 (still works perfectly in netscape ver 6, at least). My code is below. If you have any suggestionson how to address this, I'd appreciate it.

<form name="foodtype" id="foodtype" method="post" action="#<%=cat%>">
<select name="category" id="category" onChange="gotohref(this);" >
<option value="Menu Sections" Selected>Menu Sections</option>
<%for counter=0 to Ubound(popdrop)%>
<option class='dine' value="<%=popdrop(counter)%>"><%=popdrop(counter)%></option>
<%next%>
</select>
</form>

<script type="text/javascript">
function gotohref(theSelect) {
//only works for one word categories right now in explorer but fine in netscape-- probably urlencode the href on the anchor?
var myurl= window.location.search;
thehref = theSelect.options[theSelect.selectedIndex].value;
window.location.href = myurl+"#"+thehref;

}

</script>




Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.