sandeep
sandeep

Reputation: 449

jQuery not loading the source aspx page

Hi i have iframe tag in pop up window. in iframe am loading another page. if am used below code am unable to load the spurce page.

enter code here<iframe id="Iframe1" width="802" height="500">
          <script type="text/javascript">
              $(function () {
                  document.getElementById("testframe").src = "SelectMembers.aspx";

              });
          </script>       

        </iframe>

or

if am used below code am getting this error. '__pendingCallbacks[...].async' is null or not an object: callback async[i]...FIX :)

Upvotes: 3

Views: 349

Answers (2)

BizApps
BizApps

Reputation: 6130

try this:

      <script type="text/javascript">
         $(function () {
            document.getElementById("Iframe1").src = "/SelectMembers.aspx";

          });​
      </script>   

    <iframe id="Iframe1" width="802" height="500">


    </iframe>

Upvotes: 1

Adil
Adil

Reputation: 148110

Do not put the javascript between iframe tags. Add javascript in head of just before closing body tag. Also make sure that you have SelectMembers.aspx in the same folder you have the current page.

html

<iframe id="Iframe1" width="802" height="500"> </iframe>

Javacript before body closing tag

<script type="text/javascript">
      $(function () {
          document.getElementById("testframe").src = "SelectMembers.aspx";

      });
</script>       
</body>

Upvotes: 0

Related Questions