Hi Kunul,
I think I have code that does what you want:
--------------------------------------------------------------------
function QuickJumpSelect($name="", $optionvalues, $optionnames, $stylestr="")
{
($stylestr != "")? $style = $stylestr : $style = "";
// Calculate stuff
$count = count($optionnames);
$output = "";
// -- Start outputting the SELECT --
$output .= "<SELECT NAME=\"$name\"$style $size OnChange=JumpToRef(this)>";
$output .= "<option value=\"\">Jump to:</option>\n";
for($idx = 0; $idx < $count; ++$idx){
$name = $optionnames[$idx];
$val = trim($optionvalues[$idx]);
$output .= "<option value=\"$val\">$name</option>\n";
}
$output .= "</SELECT>\n";
return $output;
} // - end function
---------------------------------------------------
Call it like this:
$JumpPad = QuickJumpSelect("EenieMeenieMinyMoe", $array_of_urls,
$array_of_names_to_show_in_list, $stylestring);
stylestring is a CSS argument, like:
$stylestring = "style=\"width: 100px; font-family: Arial; font-size: 10px\"";
Now you can just print $JumpPad where you want it to be.
---------------------------------------------------
All the best,
Eivind :-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php