Click button from iFrame in Parent Window?
I am currently trying to amend our IT Support System to make it nice and simple for our end users (hospital users who are not good with computers) and need a way to click the 'Save' button from an iFrame. Inspecting the element i see the below code on the button i would link to click with code:
I can embed an iFrame on the page without invalidating our support agreement but cant edit the main page hence the reason for this question.
<input type="button" class="pushButton" id="mainForm-ApplyButton" value="Save" onclick="$C('mainForm').apply();" style="width: 121px;">
Does anyone have any ideas? Much appreciated and happy Easter!
So you want to click (or simulate a click rather) that button, which is on the 'main' page, from inside of an iframe on the same page?
As long as the main page and iframe are on the same domain (and I assume they are for this case), you should be able to do that like this:
Though, to be fair you could also just call the function that gets executed by that button directly instead. I may be wrong but I believe it would work something like this:
Thank you that works a treat! I did Google it but this seems like a minefield and i did not understand until your code on my other post on how to put this together!
Last question, how would i save the form (clicking the button) and then once the page has refreshed then click a second button (This will be a save and the press submit routine).
Originally Posted by Sup3rkirby
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread