Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback on: irt.org FAQ Knowledge Base Q203, December 10, 2000 at 15:20:15:

You are here: 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>



©2018 Martin Webb