Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 refresh page????
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 05 January 2005 :  12:27:52  Show Profile
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.”
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 05 January 2005 :  12:29:31  Show Profile
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>

Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 05 January 2005 :  12:57:55  Show Profile
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.”
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 05 January 2005 :  13:19:26  Show Profile
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 ..
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 06 January 2005 :  06:45:42  Show Profile
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.”
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 11 January 2005 :  07:48:28  Show Profile
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
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 11 January 2005 :  08:30:03  Show Profile
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.”
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 12 January 2005 :  09:15:49  Show Profile
hey shaggy how am i gonna see the topic.asp and inc_jump_to.asp ?
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 12 January 2005 :  09:19:06  Show Profile
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.”
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 12 January 2005 :  10:21:59  Show Profile
thanks shaggy i get it .. i tried it and it works thanks a lot man
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 12 January 2005 :  10:33:30  Show Profile
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.”
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 12 January 2005 :  11:05:40  Show Profile
don't worry man .. i will
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07