Results 1 to 3 of 3

Thread: popup window

  1. #1

    Thread Starter
    Addicted Member jewel's Avatar
    Join Date
    Jul 2003
    Location
    truly asia
    Posts
    153

    popup window

    i'm new to web programming...

    how can i create a popup window that will accept values in text input and then i'll use those value in asp.net behind code..

    script?


    thanks,
    jewel
    xoxo

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: popup window

    Create a hidden field on the opener page, so that when you 'submit' in the popup window, it writes the values to the hidden field. You can then work with that value in codebehind.

  3. #3

    Thread Starter
    Addicted Member jewel's Avatar
    Join Date
    Jul 2003
    Location
    truly asia
    Posts
    153

    Re: popup window

    Quote Originally Posted by mendhak
    Create a hidden field on the opener page, so that when you 'submit' in the popup window, it writes the values to the hidden field. You can then work with that value in codebehind.
    hi mendhak,

    thanks, but I dont really understand what you mean with create a hidden field, so far this what i have

    wfrmMain.aspx

    HTML Code:
    <INPUT type="button" value="New DatabaseGroup" name="btnDG" onclick  = "showDlgDG()">
    
    
    <SCRIPT>
    	var sDGName="";
    	function showDlgDG()
    	{
    		showModelessDialog("dlgDG.aspx",window,"status:false;dialogWidth:300px;dialogHeight:300px");
    	}
    	
    	function UpdateDGName()
    	{
    		idg.innerText  =sDGName;
    	}
    
    		</SCRIPT>

    dlg.html

    HTML Code:
    <INPUT 	type="text" size="25" name="txtDG">
     <INPUT type="button" value="Ok" name="btnOk" onclick="getDGName();window.close();">
    
    <SCRIPT>
    	function getDGName()
    	{
    		var sData =dialogArguments;
    		sData.sDGName = txtDG.value;
    		sData.UpdateDGName();
    	}
    		</SCRIPT>
    first it gives me error that txtDG is undefined...hmmm

    then next if this works how can my code behind get the value?

    Thanks so much!

    jewel
    xoxo

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