Option's without javascript...??

liunx

Guest
Hi ,<br />
actually i have done this that redirects automaticly...with onchange...So is it possible that the people that dont have javascript by clicking on the go button are redirect to the page !!! I cant make it :o)<br />
<br />
<FORM NAME="form1"><br />
<SELECT NAME="select" onChange="window.location=this.options[this.selectedIndex].value;" SIZE="1"><br />
<OPTION VALUE="">--Selection--<br />
<OPTION VALUE="aaa.html">aaa<br />
<OPTION VALUE="bbb.html">bbb<br />
</SELECT><br />
<input type="image" src=http://www.webdeveloper.com/forum/archive/index.php/"gif/arrow.gif" border="0" align="absmiddle"><br />
</FORM><br />
<br />
Many thx<br />
your help would be really appriciated<br />
<br />
asch<br />
:D<!--content-->You'll have to use some sort of server side language. Here's how to do it in PHP:<br />
<br />
<?PHP<br />
if (count($_POST) > 0) {<br />
header("Location:".$_POST['url']."");<br />
}<br />
?><br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<html><br />
<head><br />
<title>Example</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
</head><br />
<br />
<body><br />
<form action="<?PHP echo $_SERVER['PHP_SELF']; ?>" method="post"><br />
<p><select name="url"><br />
<option value="http://www.infinitypages.com">Infinity Web Design</option><br />
<option value="http://www.webdevfaqs.com">Web Dev FAQs</option><br />
<option value="http://www.w3c.org">W3C</option><br />
</select><br />
<input type="submit" name="submit" value="Submit"></p><br />
</form><br />
</body><br />
</html><!--content-->Yeah great works fine....really thank you ..!!<br />
<br />
:) :) :) :) :) :)<!--content-->Happy to help... :)<!--content-->I jusst found a bug with that per haps you can help me once more :o) !!<br />
<br />
actually on the same page I have a little scroll bar script...wher it is definied ..3d collor & that stuff...called : init()<br />
<br />
i call it in the body tag : with onload & style="overflow:auto"<br />
<br />
The problem is that as soon that i have put the "php" it didnt work any more...it s really funny cause all other scripts are working fine do you have any idea ?<br />
<br />
thx again...<br />
<br />
<br />
asch<br />
<br />
:D<!--content-->Hmm... I don't really know what you mean. Could you post some code, or a link please?<!--content-->Shur her it is..look the scrollbars should be white..an appear only if ther is "overflow"....<br />
<br />
Here (<!-- m --><a class="postlink" href="http://www.aschwebdesign.ch/~derivativco">http://www.aschwebdesign.ch/~derivativco</a><!-- m -->) <br />
<br />
hmm the code for scrollbar is external ther it is :<br />
<br />
function init(){ <br />
document.body.style.scrollbarFaceColor="#FFFFFF"; <br />
document.body.style.scrollbarBaseColor="#D4F6FF"; <br />
document.body.style.scrollbarDarkShadowColor="#D4F6FF"; <br />
document.body.style.scrollbar3dLightColor="black"; <br />
document.body.style.scrollbarArrowColor="black"; <br />
document.body.style.scrollbarHighlightColor="#D4F6FF"; <br />
document.body.style.scrollbarShadowColor="black"; <br />
document.body.style.scrollbarTrackColor="#F3F3F3"; <br />
<br />
thx<!--content-->You don't need JavaScript to style the scrollbars, you can use M$ proprietary CSS: <!-- m --><a class="postlink" href="http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/scrollbarColor.htm">http://msdn.microsoft.com/workshop/samp ... rColor.htm</a><!-- m --><!--content-->Yeah i have tried it this way but still does not work...<br />
<br />
Do you have any other idea ?<br />
<br />
thx<br />
<br />
:D<!--content-->
 
Back
Top