Menu(Option) Generator
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Qiksearch MenuGen</title>
<style type="text/css">
.link{font-family:verdana,arial,helvetica; font-size:8pt; color:#003399; font-weight:normal}
.link:hover{font-family:verdana,arial,helvetica; font-size:8pt; color:#0099FF; font-weight:normal}
</style>
</head>
<body bgcolor="#FFFFFF" onload="this.document.qiksearch.select_items.selectedIndex = 4">
<center><span style="font-family:arial,verdana,helvetica; font-weight:bold; color:#808080; font-size:34pt">Qiksearch</span> <span style="font-family:arial,verdana,helvetica; font-weight:bold; color:#DD0000; font-size:34pt">MenuGen</span></center>
<script language="javascript">
// Location of this script:
// http://www.qiksearch.com/javascripts/menugen.htm
//*********************************************
//* Qiksearch MenuGen *
//* Javascript Drop-Down Menu Creator *
//* (c) Premshree Pillai, *
//* http://www.qiksearch.com *
//* E-mail : premshree@hotmail.com *
//* Created on 03/14/02 *
//* Use the script freely as long as *
//* credits are maintained *
//* Visit www.qiksearch.com/javascripts.htm *
//* for more FREE scripts *
//*********************************************
var no_options;
document.write('<table cellspacing="5" cellpadding="5" style="border:2 solid #808080" align="center"><tr><td>');
document.write('<table width="100%" cellspacing="0" cellpadding="1" bgcolor="#808080" style="border:2 solid #CCCCCC; font-family:verdana,arial,helvetica; font-size:8pt"><tr><td align="middle"><a href="javascript:about()"><font color="#FFFFFF" style="text-decoration:none">About</font></a></td><td bgcolor="#FFFFFF"></td><td align="middle"><a href="javascript:help()"><font color="#FFFFFF" style="text-decoration:none">Help</font></a></td><td bgcolor="#FFFFFF"></td><td align="middle"><a href="mailto:premshree@hotmail.com"><font color="#FFFFFF" style="text-decoration:none">Contact</font></a></td><td bgcolor="#FFFFFF"></td><td align="middle"><a href="http://www.qiksearch.com"><font color="#FFFFFF" style="text-decoration:none">Qiksearch</font></a></td></tr></table>');
document.write('<form name="qiksearch">');
if(navigator.appName=="Microsoft Internet Explorer")
{
document.write('<font face="verdana,arial,helvetica" size="-1" color="#000000">Display <select name="select_items" onchange="javascript:showItems(this.document.qiksearch.select_items.value)" style="font-size:8pt">');
for(var i=1; i<=30; i++)
{
document.write('<option value="' + i + '">' + i + '</option>');
}
this.document.qiksearch.select_items.selectedIndex = 4;
document.write('</select> links.<br><br>');
}
document.write('<b>Combo Caption :</b><br><br>');
document.write('<input type="text" value="Select" name="combo_caption" size="30" style="height:20; border:1 solid #000000">');
document.write('<br><br><b>Combo Items :</b><br><br>');
document.write('<div id="items">');
for(var i=1; i<=5; i++)
{
document.write('Option : <input type="text" size="12" name="option' + i + '" style="height:20; border:1 solid #000000"> Link to : <input type="file" name="linkto' + i + '" size="15" style="height:20; border:1 solid #000000"><br>');
}
document.write('</div>');
document.write('<br><center><input type="button" name="qiksearch_submit" value="Make My Code" onclick="display()" style="font-family:verdana,arial,helvetica; font-size:8pt; height:20; width:48%; background:#EFEFEF; border:1 solid #808080; cursor:hand"> <input type="reset" onclick="javascript:location.reload();" style="font-family:verdana,arial,helvetica; font-size:8pt; height:20; width:48%; background:#EFEFEF; border:1 solid #808080; cursor:hand"></center>');
document.write('<br><font size="-2">© 2002 <a href="mailto:premshree@hotmail.com"><font face="verdana,arial,helvetica" size="-2" color="#000000">Premshree Pillai</font></a>. All rights reserved.</font></font></form>');
document.write('</td></tr></table>');
function showItems(n)
{
var item_disp = "";
for(var i=0; i<n; i++)
{
item_disp += 'Option : <input type="text" size="12" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"> Link to : <input type="file" name="linkto' + (i+1) + '" size="15" style="height:20; border:1 solid #000000"><br>';
}
no_options=n;
this.document.all.items.innerHTML = item_disp;
}
if(navigator.appName=="Microsoft Internet Explorer")
{
no_options = this.document.qiksearch.select_items.value;
}
else
{
no_options = 5;
}
function display() {
DispWin=window.open('','NewWin',
'toolbar=no,status=no,width=500,height=375')
message="<font face=arial,verdana,helvetica size=-2 color=#000000><b><!--Made with Qiksearch MenuGen-->";
message += "<br><script language="javascript" type="text/javascript">";
message += "<br>function go()";
message += "<br>{";
message += "<br> if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none")";
message += "<br> {";
message += "<br> location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value";
message += "<br> }";
message += "<br>}";
message += "<br></script>";
message += "<br>";
message += "<br><script language="JavaScript" type="text/javascript">";
message += "<br>document.write('<form name="selecter"><select name="select1">');";
message += "<br>document.write('<option value=none>" + this.document.qiksearch.combo_caption.value + "</option>');";
message += "<br>document.write('<option value=none>--------------------</option>');";
for(var i=1; i<=no_options; i++)
{
message += "<br>document.write('<option value="" + eval('this.document.qiksearch.linkto' + i + '.value') + "">" + eval('this.document.qiksearch.option' + i + '.value') + "</option>');";
}
message += "<br>document.write('</select>');";
message += "<br>document.write('<input type="button" value="Go" onclick="go()">');";
message += "<br>document.write('</form>');";
message += "<br></script>";
message += "<br><!-- Download Qiksearch MenuGen from http://www.qiksearch.com/javascripts/menugen.htm -->";
DispWin.document.write(message);
}
function about()
{
window.alert("Qiksearch MenuGen is a simple and handy tool using which you can create Javascript drop-down navigation Menus with ease. Qiksearch MenuGen, (c) 2002 Premshree Pillai. For updates visit Qiksearch at http://www.qiksearch.com. Mail me at premshree@hotmail.com");
}
function help()
{
window.alert('To use Qiksearch MenuGen, first select the number of Items you want in the menu. The default is 5. Then select the caption that will appear in the menu. Default is "Select". Then fill in the details of the Items. "Option" is the text that will appear when you pull the drop-down menu. "Link to" is the link to which that particular "Option" will point to. You may type your own link/URL or browse through to link to a local file. After you are done with all this, press the "Make My Code" Button. A new window will open, with the code you require. Press CTRL+A or right click and Select All, then copy the text and paste it wherever you require on your web page.');
}
</script>
</body>
</html>
Related examples in the same category