Author |
Topic |
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 05 January 2005 : 12:27:52
|
Yup, post a link to a *.txt version of the entire file. Chances are I made a typo somewhere due to the sforementioned lack of sleep!
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
quince
Junior Member
Canada
103 Posts |
Posted - 05 January 2005 : 12:29:31
|
here is the entire code
<html> <head> <script type="text/javascript"> function changeselect(va,el){ var arrValue,arrDisplay; arrValue=new Array(); arrDisplay=new Array(); arrValue[0]=[0,1,2]; arrDisplay[0]=["zero","one","two"]; arrValue[1]=[3,4,5]; arrDisplay[1]=["three","four","five"]; arrValue[2]=[6,7,8]; arrDisplay[2]=["six","seven","eight"]; if(va!=""){ document.getElementById(el).options.length=0; for(var x=0;x<arrValue[va].length+1;x++){ document.getElementById(el)[x]=new Option(arrDisplay[va][x],arrValue[va][x]); } } } </script> <FONT color=green></head> <body></FONT> <select size="1" name="D0" onchange="changeselect(this.options[this.selectedIndex].value"D1");"> <option value="0">country</option> <option value="1">ckk</option> <option value="2">uss</option> </select> <p> <select size="1" name="D1" id="D1"> <option value="0">zero</option> <option value="1" >one</option> <option value="2">two</option> <option value="3">three</option> <option value="4">four</option> <option value="5">five</option> <option value="5">six</option> <option value="5">seven</option> <option value="5">eight</option> </select></p> </body> <html>
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 05 January 2005 : 12:57:55
|
OK, couple of things; first off you're missing a comma between .value and "D1" in your onchange handler and the D1 should be enclosed in single quatations, not double (my bad). SO it should look like this:onchange="changeselect(this.options[this.selectedIndex].value,'D1');" Secondly, Within the function itself there's an error which has never cropped up on me before which is solved by removing the +1 from the following line: for(var x=0;x<arrValue[va].length+1;x++){ |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
quince
Junior Member
Canada
103 Posts |
Posted - 05 January 2005 : 13:19:26
|
Thank you so much .... at last it worked.... thank you a lot ... u really helped me so much ... thanks a lot ... i know that i bother you with my so many questions ... see ya .. |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 06 January 2005 : 06:45:42
|
No problemo, happy to help.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
quince
Junior Member
Canada
103 Posts |
Posted - 11 January 2005 : 07:48:28
|
hey shaggy i was wondering do u know how the drop down list, which u choose the page number of the forums in this site, works???? cause while i was trying it, i was wondering if anyone over here know how can i do like it???
waiting for your reply |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 11 January 2005 : 08:30:03
|
Have a look for the jumpto javascript function you'll find in a few Snitz files (<> line 303 in topic.asp, for example). You'll also need to have a look at the opening select tag in inc_jump_to.asp to see how it's called.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
quince
Junior Member
Canada
103 Posts |
Posted - 12 January 2005 : 09:15:49
|
hey shaggy how am i gonna see the topic.asp and inc_jump_to.asp ?
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 12 January 2005 : 09:19:06
|
Just open 'em up in your favourite text editor.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
quince
Junior Member
Canada
103 Posts |
Posted - 12 January 2005 : 10:21:59
|
thanks shaggy i get it .. i tried it and it works thanks a lot man |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 12 January 2005 : 10:33:30
|
You're welcome, although it's Snitz you should be thanking - it's their code, after all!
Don't forget to include a "powered by" link on any non-forum pages you use that on.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
quince
Junior Member
Canada
103 Posts |
Posted - 12 January 2005 : 11:05:40
|
don't worry man .. i will |
|
|
Topic |
|