1

Hi I have this two iFrame under my default.vbhtml page the code is:

<iframe class="iFrameLeft" src="Page_RequestPane.vbhtml"></iframe>
<iframe class="iFrameRight" src="Page_SKUSetup.vbhtml"></iframe>

what I want to do is when I choose a reseller and click the button "Copy SKU Setup" it the that iFrame (SKU Setup Generic) will change to a different page. the final iframe I'm targeting is:

<iframe class="iFrameLeft" src="Page_RequestPane.vbhtml"></iframe>
<iframe class="iFrameRight" src="Page_Reseller.vbhtml"></iframe>

all I have is this on jQuery, but it's wrong:

$(document).ready(function () {
  $("button").click(function () {
    $('iframe').attr('src', 'Page_Reseller.vbhtml');
    return false;
  });
});

1 Answer 1

1

If you are only trying to change the iFrameRight Your jQuery selector should be $('.iFrameRight')

I've modified your code a bit with the changes. You can see it below.

   $(document).ready(function () {
      $("button").click(function () {
        $('.iFrameRight').attr('src', 'Page_Reseller.vbhtml');
        return false;
      });
    });
Sign up to request clarification or add additional context in comments.

1 Comment

Also you should set exact selector of that button - $("button") change to ID of that button, f.e.: $("#copy_sku_setup_button").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.