Click to See Complete Forum and Search --> : Opening New Window


smulligan
11-26-2002, 03:48 PM
I am trying to create a login where the user enters their domain and and then '/stats/' is added to the end. It would then open a new window with the full url.

So if they entered webdeveloper.com it would open a new window as webdeveloper.com/stats/

Here is my code:

<SCRIPT LANGUAGE="JavaScript">
<!--
function login() {
var usite = document.gocp.usersite.value;
var udest = document.gocp.userdestination.value;
var url_str = '&usersite=' + usite + '&userdestination=' + udest;
window.location.open = url_str;
}
//-->
</script>


And the form:

<form name="gocp">
<div align="right"> www.
<input type="hidden" name="userdestination" value="/stats/">
</div>
<input type="text" name="usersite" size="20">
<input type="image" src="/images/go_but.jpg" width="24" height="20" border="0" onClick="login();">
</form>

smulligan
11-27-2002, 07:43 AM
Thanks so much Dave! I'm getting better at this and you are always here to help me out. I really appreciate you.

Susanne Mulligan