www.webdeveloper.com
Results 1 to 2 of 2

Thread: Opening New Window

  1. #1
    Join Date
    Nov 2002
    Posts
    2

    Question Opening New Window

    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>

  2. #2
    Join Date
    Nov 2002
    Posts
    2
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles