Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    Lingle, Wy
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Window.open [object] remove this

    I am using the following script.

    It opens a second(sized) window with the corect URL. (which it is supposed to)

    But it opens a second window(advances) from the main interface and places [object] in it.

    If I click the "Back" browser button it returns to the original interface.

    How can I get it to remain in the main(original) interface window?

    <html>
    <head>
    <title>untitled</title>
    <script type="text/javascript" language="JavaScript">

    function gotoURL(form) {
    var radGrp = associations.Assoc;
    for (var i=0; i<radGrp.length; i++)
    if (radGrp[i].checked) {
    location = radGrp[i].value; return;
    }
    alert('Please choose one of the Associations on the list.');

    }
    </script>


    </head>
    <body>
    <form method="post" name="associations">

    <input name="Assoc" type="radio" value="javascript:window.open('http://www.proamrodeo.com/database/CCPRAschs.html','assocWindow','width=800,height=500,left=10,top=120,screenX=10,screenY=120')"checked >CCPRA<br>

    <input name="Assoc" type="radio" value="javascript:window.open('http://www.proamrodeo.com/database/CPRAschs.html','assocWindow','width=800,height=500,left=10,top=120,screenX=10,screenY=120')">CPRA<br >

    <input name="Assoc" type="radio" value="javascript:alert('URL 3')">CPRA(TX)<br>
    <input name="Assoc" type="radio" value="javascript:alert('URL 4')">CRRA<br>
    <input name="Assoc" type="radio" value="javascript:alert('URL 5')">GCPRA<br>
    <input name="Assoc" type="radio" value="javascript:alert('URL 6')">ICA<br>
    <input name="Assoc" type="radio" value="javascript:alert('URL 6')">IMPRA<br>
    <input name="Assoc" type="radio" value="javascript:alert('URL 7')">IRCA<br><br>

    <a href="#" onMouseover="window.status='View Association Schedules.'; return true"
    onMouseout="window.status=' '; return true" onclick="gotoURL(this.form)">Schedules</a>

    </form>
    </body>
    </html>
    Thank You.

  • #2
    Regular Coder
    Join Date
    Nov 2002
    Posts
    596
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Weird script...

    <html>
    <head>
    <title>untitled</title>
    <script type="text/javascript" language="JavaScript">

    function gotoURL(oForm) {
    var radGrp = oForm.Assoc;
    for (var i=0; i<radGrp.length; i++)
    if (radGrp[i].checked) {
    window.open(radGrp[i].value,'assocWindow','width=800,height=500,left=10,top=120');
    return false;
    }
    alert('Please choose one of the Associations on the list.');
    return false;
    }

    </script>
    </head>
    <body>
    <form method="post" name="associations">
    <input name="Assoc" type="radio"
    value="http://www.proamrodeo.com/database/CCPRAschs.html">CPRA(TX)<br>
    <input name="Assoc" type="radio"
    value="http://www.proamrodeo.com/database/CPRAschs.html">CRRA<br>
    <input name="Assoc" type="radio"
    value="javascript&#58;'URL 3'">CPRA(TX)<br>
    <input name="Assoc" type="radio"
    value="javascript&#58;'URL 4'">CRRA<br>
    <input name="Assoc" type="radio"
    value="javascript&#58;'URL 5'">GCPRA<br>
    <input name="Assoc" type="radio"
    value="javascript&#58;'URL 6'">ICA<br>
    <input name="Assoc" type="radio"
    value="javascript&#58;'URL 6'">IMPRA<br>
    <input name="Assoc" type="radio"
    value="javascript&#58;'URL 7'">IRCA<br><br>
    <a href="#"
    onMouseover="window.status='View Association Schedules.'; return true"
    onMouseout="window.status=''; return true"
    onclick="return gotoURL(document.associations)">Schedules</a>
    </form>
    </body>
    </html>

    Put this all on one line:
    window.open(radGrp[i].value,'assocWindow','width=800,height=500,left=10,top=120');

  • #3
    New Coder
    Join Date
    Jul 2002
    Location
    Lingle, Wy
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    window.open [object]

    Thank you it seems to be wroking fine now with your help.

    This will eventually end up at this URL:

    ProAm Rodeo.com/schedules.htm

    Why the "o" in oForm?
    Thank You.

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Posts
    596
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oForm
    [object]

    sVal
    [string]

    iLoop
    [integer]

    bWhich
    [Boolean (T/F)]

    fAmt
    [floating-point number]

    Helps you keep track of what's what...


  •  

    Posting Permissions

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