foghorn87
03-05-2007, 02:39 PM
Hi Folks,
<script type="text/javascript">
function reloadform() {
document.account.submit()
//window.reload();
}
</script>
<form action="change_settings.php" method="post" id="account" name="account">
<select class='profile_settings_cntry' name='country' id='country' onChange="reloadform();">
The whole document is pretty long, but I wonder whether anyone can help me.
I have a countries list, with a regions list next to it, and if someone selects their country, through the magic of PHP and JS, it displays the appropriate regions list. The above is working on most of my pages, but not this one.
the onChange in the <select> tags is definitely working, as I tried changing the reloadform() function to alert('hello') and it worked. I then wondered whether the Form Document Object may not be creating, but alert(document.account.action) returned the correct form action. I then wondered whether for some reason, the document object was having problems with the actual functions, but document.account.reset() works!
Does anyone see a problem with this code, or know of any known issues that may stop it from working? The site stylist uses a lot of CSS, and I didn't know whether that may cause a conflict anywhere, anyhow?
Any help greatly received. Thanks in advance,
Tom
<script type="text/javascript">
function reloadform() {
document.account.submit()
//window.reload();
}
</script>
<form action="change_settings.php" method="post" id="account" name="account">
<select class='profile_settings_cntry' name='country' id='country' onChange="reloadform();">
The whole document is pretty long, but I wonder whether anyone can help me.
I have a countries list, with a regions list next to it, and if someone selects their country, through the magic of PHP and JS, it displays the appropriate regions list. The above is working on most of my pages, but not this one.
the onChange in the <select> tags is definitely working, as I tried changing the reloadform() function to alert('hello') and it worked. I then wondered whether the Form Document Object may not be creating, but alert(document.account.action) returned the correct form action. I then wondered whether for some reason, the document object was having problems with the actual functions, but document.account.reset() works!
Does anyone see a problem with this code, or know of any known issues that may stop it from working? The site stylist uses a lot of CSS, and I didn't know whether that may cause a conflict anywhere, anyhow?
Any help greatly received. Thanks in advance,
Tom