mooz
-
Posts
2 -
Joined
-
Last visited
Never
Posts posted by mooz
-
-
Hi there,
I am trying to automatically submit a form in an iframe with javascript. My question is whether this is possible or not, and if so how the code should look like to submit the form in the iframe?
this is the form within the iframe that I am trying to submit automatically:
<form style="clear: left; padding: 20px 5px 0 0" id="Form2051051" action="nieuw-bericht.2051051.lynkx" method="post" class="form" onsubmit="return ProcessForm( 'Form2051051' );"> <div> <a href="#" onclick="document.getElementById( 'event' ).value='Step1'; document.getElementById( 'Form2051051' ).submit(); return false;" class="button previous"><span>Wijzig</span></a> <a href="#" onclick="if ( ProcessForm( 'Form2051051' ) ) document.getElementById( 'Form2051051' ).submit(); return false;" class="button next-long"><span>Plaats bericht</span></a> </div> <input type="hidden" id="event" name="event" value="Confirmed-Step3" /> <input type="hidden" name="PostedField[_berichtId]" value="" /> <input type="hidden" name="formState" value="KQAAAAoAAAEAAgADAAQABQA9taWULZGFzZGFzIHNhZGEA" /> </form>
this is what I have tried so far:
<body LANGUAGE="javascript" onload="window.frames['myframe'].document.getElementById( 'Form2051051' ).submit();"> <iframe name="myframe" id="frame1" src="link-to-the-page-with-the-form"> </iframe> </body>
I am pretty new with this so I appreciate any help or suggestions!
thank you
Submitting a form within iframe
in Javascript Help
Posted
Hi,
The webpage within the iframe is from an external website (im not in control of it). I did some more research and have read that it's not possible to use javascript on webpages in iframes that are not within my domain. Is this true? and if so is there any alternative to auto submit a button in an iframe?