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