submit() in iframe trouble

This is a discussion on "submit() in iframe trouble" within the JavaScript Forum section. This forum, and the thread "submit() in iframe trouble are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 5th, 2007, 09:57
New Member
Join Date: Nov 2007
Location: Israel
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
submit() in iframe trouble

Hi all,
Im new to this forum... any help would be greatly appreciated.
I have a hidden "in between" page where I dynamically create a form and
hidden inputs using ASP that should submit to a second page where this data
will be used.
The form is automatically submitted using javascript. This code works in IE
and in Firefox.
The problem I am facing now is that the series of these same pages I am working with are now being used inside an iframe. Since this change, the javascript submit no longer works in Firefox, but does in IE.
Please see code below and tell me what I am doing wrong.
Thanks!

HTML: Select all
<html>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<body onload="document.getElementById('answer').submit();">
<form method=POST name='answer' id='answer' action=pagename.asp'>")
<input type=hidden name=Section value="1">
<input type=hidden name=survey value="10">
<input type=hidden name=resumeAt value='0'>
<input type=hidden name=Counter value="1">
</form>
</body>
</html>

Last edited by Rakuli; Nov 5th, 2007 at 10:18. Reason: Please use HTML tags
Reply With Quote

  #2 (permalink)  
Old Nov 5th, 2007, 10:20
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: submit() in iframe trouble

I'm not sure what you mean... The hidden form is inside of an iframe or the the whole page is? Is the submit not sending the user page or is it just submitting the iframe?

Cheers,
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Reply With Quote
  #3 (permalink)  
Old Nov 5th, 2007, 10:27
New Member
Join Date: Nov 2007
Location: Israel
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: submit() in iframe trouble

The entire page is inside and iframe. It used to be a set of pages that worked on their own. We have since revamped the system and these pages are running inside an iframe.

The submit is supposed to submit just the code above, inside the iframe, and take the user to another page - inside the iframe. It works outside the iframe in Firefox. Once I added this page is inside the iframe, it no longer works in firefox.
Reply With Quote
  #4 (permalink)  
Old Nov 5th, 2007, 10:34
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: submit() in iframe trouble

Could be this line

<form method=POST name='answer' id='answer' action=pagename.asp'>")


try adding the extra quote

<form method=POST name='answer' id='answer' action='pagename.asp'>

Or try adding a target to the form

<form method=POST name='answer' id='answer' action='pagename.asp' target="_top">
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Reply With Quote
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] refresh a different iframe once an iframe elsewhere has loaded cosmicbdog JavaScript Forum 1 Jan 25th, 2008 01:50
Trouble with iframe and back button Zonglars JavaScript Forum 0 Jan 10th, 2008 13:27
Can a jsp file in an IFrame calls a javascript function outside of the IFrame jadeite100 JavaScript Forum 0 May 31st, 2007 14:29
submit many forms - auto submit the same form many times divs JavaScript Forum 0 May 24th, 2007 10:10
Need help with Firefox iframe, jsp, form submit issue bmachine Other Programming Languages 4 Mar 14th, 2007 19:01


All times are GMT. The time now is 10:52.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43