Results 1 to 2 of 2

Thread: java script passing an object :s *RESOLVED*

  1. #1

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Smile java script passing an object :s *RESOLVED*

    hey im trying to pass the value of a text box to a popup window.
    heres my code

    reg.js
    Code:
    function OpenWin(textbox)
    {
    strName = textbox.value;
    window.open('DYNAMIC/validate.asp?Username='+strName+'',null, 'height=200,width=800,status=no,toolbar=no,menubar=no,location=no');
    }
    reg.html
    Code:
    <script language="javascript" src="include/reg.js"></script>
    <form name="Register" method="post">
    <a href="javascript:OpenWin(Register.username);">Check</a>
    <input type="text" id="username" value="username">
    </form>
    Cheers
    Last edited by john tindell; Feb 16th, 2003 at 11:36 AM.

  2. #2

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099
    reg.js
    Code:
    function OpenWin(strName){
    window.open('DYNAMIC/validate.asp?Username='+strName+'',null, 'height=200,width=300,status=no,toolbar=no,menubar=no,location=no');
    }
    reg.html
    Code:
    <a href="javascript:OpenWin<script language="javascript" src="include/reg.js"></script>
    <form name="Register" method="post">
    <a href="java script:OpenWin(window.username.username);">Check</a>
    <input type="text" id="username" value="username">
    </form>

Posting Permissions

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



Click Here to Expand Forum to Full Width