Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 24 October 2000 : 15:26:57
|
I just wanted to give a suggestion for the Jump To script. Although it works ok at the moment, when you click on the "-----" line it brings you back to the default.asp page. I've modified the script just a bit so that when the user clicks on it, it won't do anything. Here's the code (taken from sr2). The code in <b>bold</b> is what was changed from the original code. At the top of inc_jump_to.asp: <pre id=code><font face=courier size=2 id=code><!-- JUMP TO --> <form name="Stuff"> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Jump To:</b></font> <select name="SelectMenu" size="1" onchange="jumpTo(<b>this.form.SelectMenu.options</b>)"> <option value="<b>none</b>">Select Forum</option> </font id=code></pre id=code>
Where you don't want the option to be linked to a file, like the "----" for example, you put "none" for the value. Eg.: <pre id=code><font face=courier size=2 id=code><option value="none"> --------------------</font id=code></pre id=code>
The Javascript function that makes this all come together is found in active.asp (line 67-71), forum.asp (line 197-203) and topic.asp (line 130-134). Here's the script: <pre id=code><font face=courier size=2 id=code><script language="JavaScript"><!-- function jumpTo(s) {if (<b>s[s.selectedIndex].value != "none"</b>) top.location.href = <b>s[s.selectedIndex]</b>.value;return 1;} // --></script></font id=code></pre id=code>
If the option that was selected has the value of none, then it does nothing. If it doesn't have the value of none, it goes to the page specified in the value. Works ok with no errors using IE or Netscape.
<center><font color=green>*----*----*----*----*----*----*----*----*----*----*----* <font size=2>"However, if you suffer as a Christian, do not be ashamed, but praise God that you bear that name."</font id=size2> 1 Peter 4:16</font id=green></center>
<font color=red>[moved by admin on 10/24/2000]</font id=red>
Edited by - Davio on 21 November 2000 00:36:58
Edited by - Davio on 08 January 2001 00:56:21 |
|