| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Form Problem
I have a form with 5 input fields including one dynamic drop-down menu. There is an option to add to this menu if what you want isn't in it. This is done by way of a pop - up box. The box - up box has a form of its own and i can add new values to the drop down menu through this. (The values are saved in a database) When i close the pop up box the origional parent page is automatically refreshed. But this cause the other input fields to loose the values that were entered into them.
Thus this is my problem. I guess session variables would be the answer but i dont know how to do this. The origional parent page posts to a page "update.asp" and my pop-up page is "pop_up.asp" so i dont know how to save the values in my input fields into session variables. Can i post them to the "pop_up.asp" page. If so how would i do this. Or maybe there is a better solution?? |
|
#2
|
||||
|
||||
|
You can add the values to the url:
pop_up.asp?var1=x&var2=y |
|
#3
|
||||
|
||||
|
Here's a snippet of code I did once that might give some ideas:
<script language="JavaScript"> function UpdateOpenerPage(){ // Dim var. var frm; var varContactID; // Form. frmOpener = window.opener.document.frmMain; // Set form flds. frmOpener.PhoneNumber.value = "<%= ContactPhone %>"; frmOpener.CallerExtension.value = "<%= ContactExtension %>"; // Add new item to combobox and select it. frmOpener.ContactID.options.length++; frmOpener.ContactID.options[frmOpener.ContactID.options.length - 1].value = "<%= ContactID %>"; frmOpener.ContactID.options[frmOpener.ContactID.options.length - 1].text = "<%= ContactName %>"; frmOpener.ContactID.options[frmOpener.ContactID.options.length - 1].selected = true; // Close this popup window. window.close(); } </script>
__________________
J. Paul Schmidt www.Bullschmidt.com - Freelance Web and Database Developer www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips Last edited by Bullschmidt : June 30th, 2004 at 11:59 PM. |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Form Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|