Web Hosting Talk







View Full Version : Searching for a script.


Fremont Servers
10-11-2001, 09:11 PM
Does anyone know of a script that would do this?


<select>
<option>abc.com</option>
<option>abd.com</option>
<option>abe.com</option>
</select>

If abc.com is selected, then it would show this?

<form> METHOD="post" ACTION="http://www.abc.com/xxx.cgi"></form>

If abd.com is selected, then it would show this?

<form> METHOD="post" ACTION="http://www.abd.com/xxx.cgi"></form>

If abe.com is selected, then it would show this?

<form> METHOD="post" ACTION="http://www.abe.com/xxx.cgi"></form>


I want to avoid creating a page for each domain name.

iVersit
10-12-2001, 02:03 AM
You can do that with JavaScript pretty easily
use the onChange and Doc.write.....

ashben
10-12-2001, 03:57 AM
<html>
<head>
<script language="JavaScript">
function redirhost(hostval) {
document.HostForm.action = hostval;
document.HostForm.submit();
}
</script>
</head>

<body>

<form name=HostForm method=POST>

<select size="1" name="D1" onChange="javascript:redirhost(this.options[this.selectedIndex].value);">
<option value="http://www.abc.com" selected>abc.com</option>
<option value="http://www.mno.com">mno.com</option>
<option value="http://www.xyz.com">xyz.com</option>
</select>

</form>
</body>

</html>