Monday 15 July 2013

javascript - jQuery Selectors and IFrames -


I would appreciate some help with the following:

There are three variants inside my three commandments In addition to clicking the button button in three general guardian pages, the form needs to be submitted in IFrames.

Iframes are dynamically instatuted in the original page via Javascript, but I do not think that really matters.

There are three splinted tags used to attract the iframes: div-1 div-2 div-3 is not id in any form. However, all three variations have the same name attribute "RDForm "Shares.

Will the selector be appointed to submit each form in an Okvak button event? Or is it more complicated than that?

If you have access to the frame:

  & lt; Input type = "button" class = "submit" data-iframe = "iframe_name_1" value = "submit" /> & Lt; Input type = "button" class = "submit" data-iframe = "iframe_name_2" value = "submit" /> & Lt; Script type = "text / javascript" & gt; $ (Function () {$ ('. Submit'). ('Click', function (e) {e.preventDefault (); var iframename = $ (this) .data ('iframe'); window.top [' Iframename ']. Document.rdForm.submit ();});}); & Lt; / Script & gt;    

No comments:

Post a Comment