|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
<iframe> question
hy. need some help pls.
i have index.php and page_2.php. on index.php i have a dropdown (name=country) and a <iframe> with page_2.php loading in it. The page page_2.php has also a dropdown (name=cities). When i choose a country in index.php, it loads in the dropdown from the <iframe > the corresponding cities. The question is how I take selected value from dropdown loaded in the <iframe> and insert it in a $db.? thx in advance |
|
#2
|
||||
|
||||
|
I would think you'd have a js in the iframe that updates the parent page with the dropdown's value onchange. Then just do a standard form post from the main page.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
|||
|
|||
|
Index.php
Code:
<head> </head> <body> This page contains an iframe: <form name=form1> <input type=text name=text1 value="hello"> </form> <iframe name=if1 src="iframe.php" width=400 height=400> </body> </html> iframe.php Code:
<html>
<head>
<script>
function Change(){
parent.document.form1.text1.value=document.form2.t ext2.value;}
</script>
</head>
<body>
(This page is in a iframe)
<form name=form2>
<input type=text name=text2 value="good bye">
</form>
<a href="javascript:Change()">Click to exchange data.</a>
</body>
</html>
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > <iframe> question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|