473,804 Members | 2,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

delay form submission - iframe access denied

110 New Member
i have a form and in that i iframe
in the main form
[HTML]<form name='form1>
<iframe name="frame1" id="iframe1" src="iframe1.ph p" scrolling="yes" width="300%" frameborder="0" height="300"></iframe>
<input type="button" name="save" onclick="save() ;">
</form>
[/HTML]
Expand|Select|Wrap|Line Numbers
  1. function save(){
  2. window.frames['iframe1'].document.forms['iniframe'].add.click();
  3. document.form1.submit();
  4. }
  5.  
this code submits the frame data from main form and also main form data but
both the things are done at a time
i want that once iframe is form submitted and allthe queries performed to insert data on the iframe form then only main form data should be submitted
is there anyway to delay this
Jan 24 '08 #1
11 3656
acoder
16,027 Recognized Expert Moderator MVP
Use the setInterval method.

Remember to use code tags. You should know by now that you're expected to use code tags when posting code.
Jan 24 '08 #2
SSG001
110 New Member
This is the command click the submit button on the iframe then similarily what
command is used to submit the main form from iframe
Expand|Select|Wrap|Line Numbers
  1. [window.frames['iniframe'].document.forms['ini'].add.click();
I want to give the submit command from my iframe when all the queries of iframe are over say something like this

document.form1. submit();
instead of giving it in the save function of main form

how do i access the main form from iframe for this

Thanks in advance
Jan 25 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
You should be able to access the main page using parent.
Jan 25 '08 #4
SSG001
110 New Member
Expand|Select|Wrap|Line Numbers
  1. window.frames['frame1'].forms['form2'].add.click(); 
i have a main form where iframe is given
and in the iframe shows some details now i have one save button on the main form which click the add button from the iframe
i'm getting access denied erro
i alerted
Expand|Select|Wrap|Line Numbers
  1. alert(window.frames.frame1.location.href);
and it alerts does not give me error for this then wot is the problem



Thanks in advance
Apr 30 '08 #5
SSG001
110 New Member
this works and show the date also in the iframe but whne i try to post it
i'm getting an error access denied for this
Apr 30 '08 #6
pronerd
392 Recognized Expert Contributor
Please do not post the same question repeatedly.

I do not think you are allowed to do what you are trying. Unlike normal frame elements iFrames are not part of the existing window or document elements. So my understanding is that you can not access them with JavaScript. This restriction is intentional to prevent security problems.
Apr 30 '08 #7
acoder
16,027 Recognized Expert Moderator MVP
I've merged the threads.

Moderator.
May 1 '08 #8
acoder
16,027 Recognized Expert Moderator MVP
I do not think you are allowed to do what you are trying. Unlike normal frame elements iFrames are not part of the existing window or document elements. So my understanding is that you can not access them with JavaScript. This restriction is intentional to prevent security problems.
That's not strictly true. You can access iframe contents from the same domain. See, for example, this link.
May 1 '08 #9
acoder
16,027 Recognized Expert Moderator MVP
i have a main form where iframe is given
and in the iframe shows some details now i have one save button on the main form which click the add button from the iframe
i'm getting access denied erro
i alerted
Expand|Select|Wrap|Line Numbers
  1. alert(window.frames.frame1.location.href);
and it alerts does not give me error for this then wot is the problem
Is the iframe page from the same domain?
May 1 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2587
by: Salty Dog | last post by:
Code: <%Response.Buffer = False%> <HTML> <HEAD> <title>Printing</title> </HEAD> <BODY> <center> <% FilePath = "c:\WUTemp\441817810_receiver.txt"
3
1921
by: Chris Smith | last post by:
Good morning, Is there a good way to use JavaScript to send a form submission, but get back the response as a string, rather than loading it into a page? I could write the code to send the submission via XMLHttpRequest, but that seems hard... especially implementing multipart-encoded form submission such as required for file upload. Ideas?
7
2018
by: degmsb | last post by:
With Java script when a user hits submit on a form on my site, is it possible to take the values from the form and submit them to another form on another Url without the user who submitted the form on my site knowing? Essentially ones the user on my site hits submit they would get a thank you page but on the back end I want to take the values from the form and submit them to a form on another url on another site Please help.
6
15066
by: PD | last post by:
I have a parent .Net page (http://mywebsite/project.aspx) that has an iframe (http://iframe/iframe.aspx) which are on seperate domains. I need to adjust the scrolling on the parent window due the size of the iframe. It displays a rather lengthy message which causes scrolling on the parent page (not in the iframe) which is what the UI folks want. I need to be able to scroll the parent page from a click in the iframe. After they read this...
1
5145
by: srivatsans101 | last post by:
Hi, I'm trying to access the IFrame contents on a HTML page as frames.document But in IE, I'm getting Access Denied Error Message. I tried to add the IFrame's Src WebSite (a local/intranet hosted dynamic HTML page) to Trusted Sites list in IE Options.
5
7710
by: brad | last post by:
I'll post my code below. My goal is to grab the selected text in an iFrame from javascript (really any way possible). When I highlight text in the iFrame and click the link outside of the iFrame, I receive the following error: Firefox FireBug Error uncaught exception: Permission denied to get property HTMLDocument.getSelection IE7 Error
2
11576
by: cybervigilante | last post by:
I have a table inside an iframe that has paypal buttons in table cells. Each button is a Form. (The table has to be in an iframe to protect it from a containing CMS, which buggers the forms otherwise) When I click on one of the buttons I go to paypal, but the resulting PayPal page is still inside the iframe and too small, so you have to scroll. I need to get out of the iframe but still go to paypal. What is the javascript I'd use? I...
5
2304
by: imimin | last post by:
Hello! I am new to your forum and I must say it looks GREAT! I have a bit of a problem. I use a vendor for my business that I am pulling data off of their web-site and putting on mine using IFRAMES. Some (A LOT) of their pages have POST submit buttons on them (which of course take you to the next page(s)). These pages are on their order detail pages. I notice that when I click on one of these POST submit buttons, my site is left (along...
2
5118
by: Rahina | last post by:
I am working in Dreamweaver 8, and I have created a simple form: http://www.realmofmystery.com/app.html This is a free website I am doing for some friends, so nothing fancy. And, I learned web design before all the CGI and PHP stuff got big, so I prefer to do things simply. The form worked fine, emails the results like perfect, but it refused to redirect the page to the confirmation. I thought I could add an onClick to the submit button,...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.