PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 5th, 2004, 06:56 PM
Think Pink Think Pink is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 4 Think Pink User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<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

Reply With Quote
  #2  
Old August 6th, 2004, 08:25 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
Send a message via ICQ to dhouston
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.

Reply With Quote
  #3  
Old August 7th, 2004, 02:40 PM
Think Pink Think Pink is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 4 Think Pink User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > <iframe> question


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap