Populating a text box with the content of new pop

Results 1 to 4 of 4

Thread: Populating a text box with the content of new pop

  1. #1
    minnie Guest

    Default Populating a text box with the content of new pop

    *<BR>Here&#039s what I want to do.<BR>I have a text box and on clicking the text box a new popwindow should come with values like A,B,C..(which I will hard code on the new window say..newwindow.asp)<BR>Onclicking &#039A&#039 on the new window, the same value should be populated in the text box and the pop window should close by itself.<BR>I have two files <BR>mainwindow.asp <BR>newwindow.asp<BR>So far I have achieved the popup window part by the following code.<BR><BR><BR>&#060;FORM id="frmname" name="frmname" method=post&#062;<BR>&#060;INPUT id=text1 name=text1 onfocus=javascript:winpopup() width = 10&#062;<BR>&#060;SCRIPT language=javaScript&#062;<BR>function winpopup(){<BR><BR>window.open("newwindow.asp?Page =BODY&Form=frmname&Element=text1","winpopup","tool bar=0,location=0,status=0,menubar=0,scrollbars=0,r esizable=1,top=100,left=100,width=350,height=200") <BR> <BR>}<BR><BR><BR>&#060;/SCRIPT&#062;<BR> &#060;/FORM&#062;<BR><BR>Now, what code would I use in Newwindow.asp so that the value I <BR>click should get passed to the text box in the main window.<BR><BR>I have tried all sorts of things and it&#039s frustrating. PLEASE HELP!!<BR>THANKS!<BR>

  2. #2
    Steve Craft Guest

    Default RE: Populating a text box with the content of new

    I have been trying to do the exact same thing for 22 hours and have not found a solution yet. Actually, to get started I cannot figure out how to pass vales from the parent form to the child.<BR><BR>Can anyone help?!

  3. #3
    Iain Rogers Guest

    Default RE: Populating a text box with the content of new

    What you&#039re trying to do is not easy - don&#039t be discouraged. I have found a sort-of-answer to this: use session variables. You can write to them from your asp, and call them somewhere else in your site. It does mean messing around with your session recordset, but you can do this. Search the ASP sites for "session variables" to find out how.

  4. #4
    Scott Leonard Guest

    Default RE: Populating a text box with the content of new

    I&#039m not sure if this will work for you or not. But you could always use the ShowModalDialog function. That will call an asp page with arguments or without. Then use the window.returnvalue = 6 on that asp page to return that value back to the calling page. Hope this helps.<BR><BR>example <BR><BR>upc=window.showModalDialog _("FindEquipmentPage.asp","","dialogTop=180px;dial ogHeight=420px;dialogwidth=800px;")<BR><BR><BR>Sco tt Leonard<BR>


Posting Permissions

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