I'm making a form, but I want to refresh the drop down lists whilst keeping all the other (mainly text) values.
I want to do the refresh when I close a popup.
Any ideas?
I'm making a form, but I want to refresh the drop down lists whilst keeping all the other (mainly text) values.
I want to do the refresh when I close a popup.
Any ideas?
Hmm a combination of JavaScript and server side code I think.
In the pop-up, you can do stuff on window.close, like opener.[function] (if memory serves me rightly). Then just use <%= %> tags in each of the form field values and then you can change them on the server when the page refreshes.
You were a bit vague though
would opener.form.submit work??
could then set a radio button that the user would have to toggle to say whether they'd finished the form or not. If the form wasn't complete, it would error check and would resubmit the form to itself.
have a crack at this...
in the <head> of your popup you'll mostly be needing...
<script language="JavaScript">
function CloseMe() {
window.opener.location.assign('MyForm.asp?value=' + document.form.txtField.value)
window.close()
}
</script>
and in the body...
<a href="javascript:void" onclick="CloseMe()">Click me; I Rock!</a>
you'll need to change the document.form.txtField.value bit to be the name youve assigned for your form and field. It will then pass that value back to your form which will be loaded into the browser. You'll need some code in your form to handle the value being passed through the querystring and do exactly what you want with it!
HTH
There are currently 1 users browsing this thread. (0 members and 1 guests)