Results 1 to 2 of 2

Thread: urgent..help needed

  1. #1
    Join Date
    Jul 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default urgent..help needed

    I have a java script code. At the end when the user clicks on the button after entering the values in the 3rd page, the values shall be displayed in a new page. Please help me out with the final approach:

    Code:
    <html>
    
    <head>
    
    <script language="LiveScript">
    
    function WinOpen() {
    
    if (document.form1.cap.value == "")
    
    {
    
    alert("Enter value in text box");
    
    return;
    
    }
    
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    
    msg.document.write("<HTML><HEAD><TITLE>Yo!</TITLE></HEAD>");
    
    msg.document.write("<CENTER><h1><B>This is really cool!</B></h1></CENTER>");
    
    msg.document.write('<BODY><form name="form2">');
    
    for(var i =0; i < document.form1.cap.value; i++)
    
    {
    
    msg.document.write("<INPUT type=text name=tbAlphaNumeric[i]>");
    
    msg.document.write("<br>");
    
    }
    
    msg.document.write('<input type="button" name="Button2" value="Steal" onClick="javascript:window.opener.WinShow();">');
    
    msg.document.write('</form></BODY></HTML>');
    
    }
    
    function WinShow() {
    
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    
    msg.document.write("<HTML><HEAD><TITLE>Great!</TITLE></HEAD>");
    
    msg.document.write("<CENTER><h1><B>Display of second page text elements!</B></h1></CENTER>");
    
    for(var j =0; j < document.form1.cap.value; j++)
    
    {
    
    msg.document.write(document.form2.tbAlphaNumeric[j].value);
    
    msg.document.write("<br>");
    
    }
    
    msg.document.write('</form></BODY></HTML>');
    
    }
    
    </script>
    
    </head>
    
    <body>
    
    <form name="form1">
    
    <INPUT type= "text" name=cap>
    
    <input type="button" name="Button1" value="Push me" onClick="WinOpen()">
    
    </form>
    
    </body>
    
    </html>
    Last edited by ddadmin; 07-08-2008 at 10:05 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    How many times do you want this to loop, if you tell me that I may beable to make my own version.
    Jeremy | jfein.net

Bookmarks

Posting Permissions

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