hello all. I am not a JavaScript programmer, so pls don’t scream at me.
here is my problem.
I have index.php and iframe.php. On index.php is an <iframe src=”iframe.php” name=”content” width=”100″ height=”100″></iframe>
On index.php i have a dropdown selCountry
[CODE]
<form name=”country” action=”submit.php” method=”post”>
<select id=”selCountry” name=”selCountry” onChange=”parent.content.location.href=iframe.php?selCountry=’+document.getElementById(‘selCountry’).value”>
/***********************************************
* here comes the PHP code to generate the dropdown list
***********************************************/
</select>
<input type=submit>
</form>
with an onChange effect, that changes dropdown selCity
[CODE]
<form name=”city” method=”post”>
<select name=”selCity”>
/***********************************************
* here comes the PHP code to generate the dropdown list
***********************************************/
</select>
</form>
located in the on the iframe.php.
When i select a country from selCountrry, it loads in selCity all cities from database that are from that country.
So far so good.
What I want (and I don’t know) is to make a JavaScript in index.php that catches the value of the selected selCity and when the <submit> button from index.php is hit, it sends the values to $db.
Maybe I could use a hidden field on index.php form that catches the value i need.
Hope i made my self clear.
Anyhow, help would be greatly apriciated.
Thx in advance