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

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 24th, 2007, 06:23 PM
jaeSun jaeSun is offline
got Rice?
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2004
Posts: 509 jaeSun User rank is Private First Class (20 - 50 Reputation Level)jaeSun User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 7 h 39 m 38 sec
Reputation Power: 9
Form in iframe, action in parent window

I have an IFRAME.

within the iframe is a page that has a form, that I would like to have it open in the parent window.

so when a user submits the form in the IFRAME, it will submit and process the form in the parent page.

i'm searching around for how to do it. and i cant seem how to do it. everything brings examples using regular frames.

any ideas to point me in the right direction?

It is required to be in an IFRAME for this case, (and not worried about compatibility as it is a local intranet page, and everyone with access to this has updated browser, etc)

here is my code

Main page:
Code:
...
<iframe src="editphotos_frame.cfm?iid=#request.iid#" 
			width="747" height="200" scrolling="no"
			frameborder="0">
		</iframe>
...


iframe:

Code:
<script type="text/javascript">
	function SubmitPhotoChange()
	{
		var blnConfirm = confirm('By performing this action all actual photos except for the first one will be deleted.');
		if (blnConfirm) document.frmProcessPhotoChange.submit();
	}
</script>

<form action="process_photo_change.cfm" method="post" name="frmProcessPhotoChange">
<select name="PhotoType" onChange="SubmitPhotoChange();">
<option value="1">Actual (#get_v.ImgTotal# Available)</option>
</select>
...


i simplified some of the javascript/html for example purposes.

so the form, i would like to have it submit in the main page, reloading the whole page rather than just the iframe. the code above works if there was no iframe which is fine, except in this one case where it is nested inside an iframe.

any advice/tips would be appreciated

Last edited by jaeSun : October 24th, 2007 at 06:29 PM.

Reply With Quote
  #2  
Old October 25th, 2007, 02:12 AM
KorRedDevil's Avatar
KorRedDevil KorRedDevil is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Aug 2005
Location: Bucharest ROMANIA
Posts: 2,557 KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level)KorRedDevil User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 5 h 34 m 26 sec
Reputation Power: 614
Send a message via Yahoo to KorRedDevil
use the HTML target attribute

<form target="_parent".....>
__________________
HELP SAVE ANA

Reply With Quote
  #3  
Old October 25th, 2007, 02:32 PM
jaeSun jaeSun is offline
got Rice?
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2004
Posts: 509 jaeSun User rank is Private First Class (20 - 50 Reputation Level)jaeSun User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 7 h 39 m 38 sec
Reputation Power: 9
hmmm, in 1 page. works fine.

i use it on another place, and it seems take the page out of the frame into the parent page, and then submit it (all in like 1 second). so there is like a delay and looks weird.

i use JS to set the target of the form in both cases, both to "_parent" .

what may cause the form to do that?

Reply With Quote
  #4  
Old October 25th, 2007, 03:05 PM
jaeSun jaeSun is offline
got Rice?
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2004
Posts: 509 jaeSun User rank is Private First Class (20 - 50 Reputation Level)jaeSun User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 7 h 39 m 38 sec
Reputation Power: 9
nvm, figured it out.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Form in iframe, action in parent window

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 - 2013, Jelsoft Enterprises Ltd.

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