Click to See Complete Forum and Search --> : Refreshing page after on change event


Debra
03-14-2006, 11:05 AM
I am having problems reloading the new data in an asp form. First, I get the data from the dataset and load the form. They can then make changes to the data through a series of drop down selects. The first is selected which determines the content of the next dropdown and so on. The dataset is updated with each select. I have tried everything, even the meta nocache and cannot get the form to load with the new select unless the page is refreshed manually. I would appreciate so much if you could advise as I am on a tight schedule with this project.

Here is the script that does the on change event. I have tried several onload events but they refresh the page before the event finishes firing and the data does not load.


<SCRIPT LANGUAGE="VBScript" >
Function On_Combo_Change(Lstr_Control_Name)
'EditForm.Submit
window.document.forms("AddCorr").item("OnChangeEvent").value = Lstr_Control_Name.name
AddCorr.submit
'Msgbox(window.document.forms("AddCorr").item("SaveCorr").value)
'Msgbox(Lstr_Control_Name.name)
End Function
</SCRIPT>

lmf232s
03-15-2006, 04:13 PM
well this will submit the page
document.[name of form].submit();
exp.
document.MyForm.submit();

If you want to submit the page like its a fresh hit then you could do something like this

document.MyForm.action = 'MyPage.asp';
document.MyForm.submit();

Terrorke
03-16-2006, 03:07 AM
If you want to reload a page, you can always try something like:

window.location.reload()