2-Level combo box Help!
3 posters
Page 1 of 1
2-Level combo box Help!
Ok!
So i tried adding this to my forum:
http://www.javascriptkit.com/script/script2/2levelcombo.shtml
But when i do it all that shows up is place holder content, and when I'm On and Html Editor its Normal and works fine but does not when i place it on my fourm!
heres's the code:
So i tried adding this to my forum:
http://www.javascriptkit.com/script/script2/2levelcombo.shtml
But when i do it all that shows up is place holder content, and when I'm On and Html Editor its Normal and works fine but does not when i place it on my fourm!
heres's the code:
- Code:
<form name="dynamiccombo">
<select name="stage2" size="1" onChange="displaysub()">
<option value="#">This is a place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
</select>
<input type="button" name="test" value="Go!"
onClick="gothere()">
</form>
<script>
<!--
//2-level combo box script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
//STEP 1 of 2: DEFINE the main category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the first line, as it's used to display main title
var category=new Array()
category[0]=new Option("SELECT A CATEGORY ", "") //THIS LINE RESERVED TO CONTAIN COMBO TITLE
category[1]=new Option("Webmaster sites", "combo1")
category[2]=new Option("News sites", "combo2")
category[3]=new Option("Entertainment", "combo3")
//STEP 2 of 2: DEFINE the sub category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the LAST line, as it's used to display submain title
var combo1=new Array()
combo1[0]=new Option("JavaScript Kit","http://javascriptkit.com")
combo1[1]=new Option("Dynamic Drive","http://www.dynamicdrive.com")
combo1[2]=new Option("Freewarejava.com","http://www.freewarejava.com")
combo1[3]=new Option("Free Web Templates","http://www.freewebtemplates.com")
combo1[4]=new Option("Web Monkey","http://www.webmonkey.com")
combo1[5]=new Option("BACK TO CATEGORIES","") Â //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE
var combo2=new Array()
combo2[0]=new Option("CNN","http://www.cnn.com")
combo2[1]=new Option("MSNBC","http://www.msnbc.com")
combo2[2]=new Option("BBC News","http://news.bbc.co.uk")
combo2[3]=new Option("ABC News","http://www.abcnews.com")
combo2[4]=new Option("BACK TO CATEGORIES","") Â //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE
var combo3=new Array()
combo3[0]=new Option("Hollywood.com","http://www.hollywood.com")
combo3[1]=new Option("MTV","http://www.mtv.com")
combo3[2]=new Option("ETOnline","http://etonline.com")
combo3[3]=new Option("BACK TO CATEGORIES","") Â //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE
var curlevel=1
var cacheobj=document.dynamiccombo.stage2
function populate(x){
for (m=cacheobj.options.length-1;m>0;m--)
cacheobj.options[m]=null
selectedarray=eval(x)
for (i=0;i<selectedarray.length;i++)
cacheobj.options[i]=new Option(selectedarray[i].text,selectedarray[i].value)
cacheobj.options[0].selected=true
}
function displaysub(){
if (curlevel==1){
populate(cacheobj.options[cacheobj.selectedIndex].value)
curlevel=2
}
else
gothere()
}
function gothere(){
if (curlevel==2){
if (cacheobj.selectedIndex==cacheobj.options.length-1){
curlevel=1
populate(category)
}
else
location=cacheobj.options[cacheobj.selectedIndex].value
}
}
//SHOW categories by default
populate(category)
//-->
</script>
<p align="center">This free script provided by<br />
<a href="http://javascriptkit.com">JavaScript
Kit</a></p>
Re: 2-Level combo box Help!
That is just a jump box which all forum versions have.
See if this is similar - https://help.forumotion.com/t41195-drop-down-list
See if this is similar - https://help.forumotion.com/t41195-drop-down-list
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: 2-Level combo box Help!
No thats not what i was looking for! For example
It will list staff members names the when a staff member name is picked it Will Then jump to a menu with Pm, Email and the choose from there! Is that understanable?
It will list staff members names the when a staff member name is picked it Will Then jump to a menu with Pm, Email and the choose from there! Is that understanable?
Re: 2-Level combo box Help!
Where are you adding this, and what is your forum's version?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: 2-Level combo box Help!
I have tried it in my Index_body and my Portal_body as well as an HTML document!
Phbb2
Edit:
Heres a html page with the code on it:
http://sir-mayo.forumotion.com/h8-code-help
See how its saying place holder text it should look like this:
Phbb2
Edit:
Heres a html page with the code on it:
http://sir-mayo.forumotion.com/h8-code-help
See how its saying place holder text it should look like this:
Re: 2-Level combo box Help!
I tried it on my forum in the homepage message and it worked.
Did you edit the parts that can be edited?
Did you edit the parts that can be edited?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: 2-Level combo box Help!
I think heres my edited code:
- Code:
<form name="dynamiccombo">
<select name="stage2" size="1" onChange="displaysub()">
<option value="#">This is a place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
</select>
<input type="button" name="test" value="Go!"
onClick="gothere()">
</form>
<script>
<!--
//2-level combo box script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
//STEP 1 of 2: DEFINE the main category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the first line, as it's used to display main title
var category=new Array()
category[0]=new Option("Contact Us ", "") //THIS LINE RESERVED TO CONTAIN COMBO TITLE
category[1]=new Option("Sir.Mayo", "combo1")
category[2]=new Option("Zyon ", "combo2")
category[3]=new Option("Mr.Mustard", "combo3")
//STEP 2 of 2: DEFINE the sub category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the LAST line, as it's used to display submain title
var combo1=new Array()
combo1[0]=new Option("Email","mailto:sir.mayo@yahoo.com")
combo1[1]=new Option("PM ","http://sir-mayo.forumotion.com/privmsg?mode=post&u=1")
combo1[2]=new Option("BACK TO CATEGORIES","") //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE
var combo2=new Array()
combo2[0]=new Option("PM","http://sir-mayo.forumotion.com/privmsg?mode=post&u=3")
combo2[1]=new Option("BACK TO CATEGORIES","") //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE
var combo3=new Array()
combo3[0]=new Option("PM","http://sir-mayo.forumotion.com/privmsg?mode=post&u=2")
combo3[1]=new Option("BACK TO CATEGORIES","") //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE
var curlevel=1
var cacheobj=document.dynamiccombo.stage2
function populate(x){
for (m=cacheobj.options.length-1;m>0;m--)
cacheobj.options[m]=null
selectedarray=eval(x)
for (i=0;i<selectedarray.length;i++)
cacheobj.options[i]=new Option(selectedarray[i].text,selectedarray[i].value)
cacheobj.options[0].selected=true
}
function displaysub(){
if (curlevel==1){
populate(cacheobj.options[cacheobj.selectedIndex].value)
curlevel=2
}
else
gothere()
}
function gothere(){
if (curlevel==2){
if (cacheobj.selectedIndex==cacheobj.options.length-1){
curlevel=1
populate(category)
}
else
location=cacheobj.options[cacheobj.selectedIndex].value
}
}
//SHOW categories by default
populate(category)
//-->
</script>
<p align="center">This free script provided by<br />
<a href="http://javascriptkit.com">JavaScript
Kit</a></p>
Re: 2-Level combo box Help!
I'm comfuse , what you really want ?
You want to make a tab and there to be name of staff and if you click on someone name , will redirect you to send him a PM ?
You want to make a tab and there to be name of staff and if you click on someone name , will redirect you to send him a PM ?
Re: 2-Level combo box Help!
Yes There should be two options one for A pm and one for an email!
But let me try in in my home page message and see if that works!
But let me try in in my home page message and see if that works!
Similar topics
» Can i make a trust level where the same place he waning level is?
» combo box
» Combo 2 in 1 website
» color combo
» forumotion color combo
» combo box
» Combo 2 in 1 website
» color combo
» forumotion color combo
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum