Sunday, November 23, 2008
Register      Login


Discussion Forums
Search Forum Home 
 
     
  FREE ASP SUPPORT  General  input field...
 
 
 input field 
 
 
Grifen
1 posts
input field 
Posted: 25 Jul 06 7:01 AM (Denmark) 
  


I want to have a bottom that when i clik it pops up with a box, where the user have to type, the name he wants his session saved under.

The box code:

<table align="right">
<tr>
<td valign="top" align="right">
<form action="Save.asp" name="Save" method="post" />
<b><font size="-1">Save </font></b>
<input type="submit" value="Save" name="Input" onClick="return prompt('Enter the name you whant to save it under?')"/>
</form>
</td>
</tr>
</table>


This is going great gets the box, and can enter my text. Now the problem is, how do i get the entert text in a variable on the new page, you can se i send the use to, so i can output it?
 
 
edt_anton
1 posts
Re: input field 
Posted: 23 Nov 06 6:53 AM (N/A) 
  
Hello Grifen,

Thanks for posting your question. You can use the document object model (DOM) to navigate the paren page (the page that made the popup pop) from your popup page to set the value someone on that parent page rather than just returning the value to the popup page itself.

You have:

onClick="return prompt('Enter the name you whant to save it under?')"

Instead do something like this (not actual code, but you should get the idea):

onClick="window.parent.forms[0].some-element.value = prompt('Enter the name you whant to save it under?')"

Hope this helps. Let us know if you need anymore help.
 
  
   FREE ASP SUPPORT  General  input field... 
   
   
   


Terms Of Use Copyright (c) 1998 - 2005 aspsites.com