Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.
Results 1 to 3 of 3

Thread: Javascript Help Needed.....

  1. #1
    Alex's Avatar
    Join Date
    Mar 2010
    Location
    Hampshire
    Age
    40
    Posts
    543

    Default Javascript Help Needed.....

    Hey guys and girls....

    I need some Javascript assistance as I'm now stuck!

    I need to be able to make the login window open in a NEW window!

    Here is the current coding :

    <form action="http://alexentertainmentplanning.co.uk/clientlogon.asp" method="post">
    <table align="center">
    <tbody>
    <tr>
    <td>
    Username</td>
    <td>
    <input name="username" type="text" /></td>
    </tr>
    <tr>
    <td>
    Password</td>
    <td>
    <input name="password" type="password" /></td>
    </tr>
    <tr>
    <td>
    &nbsp;</td>
    <td>
    <input name="submit" type="submit" value="Log On" /></td>
    </tr>
    </tbody>
    </table>
    <br />
    <br />
    <SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>document.write("<p align=center><a href='javascript:SendPasswordWindow()'>Forgot Your Password?</a></p>")</SCRIPT><NOSCRIPT><a href="http://alexentertainmentplanning.co.uk/sendpassword.asp?typeoflogon=client">Forgot Your Password?</a></NOSCRIPT></form>
    <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">

    <!--

    function SendPasswordWindow() {

    spWindow = window.open('http://alexentertainmentplanning.co.uk/sendpassword.asp?typeoflogon=client','spWindow','w idth=350,height=150,menubar=no,scrollbars=no,resiz able=yes,location=no,directories=no,status=no');

    spWindow.focus();

    }

    // -->

    </SCRIPT>

    I've tried everything I can think of to make it "pop" open.... but nothing is working!

    Any clues?????

    In the HREF section I have tried adding _Target / _Self / _Blank and nothing changes! So we can count that out! LOL

  2. #2
    Jiggles's Avatar
    Join Date
    Mar 2006
    Location
    Edinburgh, Scotland.
    Age
    31
    Posts
    8,327

    Default

    <!-- TWO STEPS TO INSTALL POPUP WINDOW:

    1. Paste the first into the HEAD of your HTML document
    2. Use the code to open the popup page on your site -->

    <!-- STEP ONE: Copy this code into the HEAD of your HTML document -->


    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=500,height=500,left = 470,top = 200');");
    }
    // End -->
    </script>

    <!-- STEP TWO: Use the following link to open the new window -->
    <A HREF="javascriptopUp('http://alexentertainmentplanning.co.uk/sendpassword.asp?typeoflogon=client')">Forgot Password?</A>
    Try that.
    Last edited by Jiggles; 13-06-2010 at 09:13 PM.

  3. #3

    Join Date
    Jan 2009
    Location
    Bristol
    Age
    45
    Posts
    3,487

    Default

    Quote Originally Posted by AlexEntertainment View Post
    In the HREF section I have tried adding _Target / _Self / _Blank and nothing changes! So we can count that out! LOL
    The syntax is target="_new" or target="_self" or target="_blank", e.g.:

    <a href="link.html" target="_new">Link</a>

    Hope that helps to some extent. If the code you were using before wasn't working, then you'll probably find that your browser was showing the "NOSCRIPT" section, because the javascript should definitely have worked. *

    Julian

    * Caveat - I haven't read the code in detail or tried it myself, but in principle it ought to work

Posting Permissions

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