tags:

views:

25

answers:

1

Hello, I'm pulling in a registration form from a third party on my company's website (http://www.pershing.com/events/customer_conference/register/index.html).

  • The user selects the type of attendee they are and hits "Next".
  • At this point they are asked to input their information.

The problem happens when the user hits "Back". The iFrame doesn't resize since the page is not getting refreshed.

Can somebody please help me? Would I be able to add some type of "onClick" function to the "Back" and "Next" buttons? Thanks.

A: 

Assuming the next and back buttons have an id (if they don't, I don't know if it's possible to do what you want):

var iframe=$('iframe#iframe_id');//iframe id
iframe.load (function(){
    var next_button=iframe.contents().find("#next");
    var back_button=iframe.contents().find("#back");

    next_button.click(
    function(){
        alert('next clicked');//just to test
        //add resize code here
    });

    back_button.click(
    function(){
        alert('back clicked');//just to test
        //add resize code here
    });
}); 
stormdrain
Thanks Stormdrain.