Results 1 to 3 of 3

Thread: Alternative to onload?

  1. #1
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Alternative to onload?

    I've built a page that has an iframe. Although both pages are served from the same domain, I only have access to the page which has the iframe and not the page in the iframe. I've written javascript to change styles and do redirects in the iframe - everything works.

    In one of the iframe pages, when you click on the submit button, I want to redirect the returned page to another page of my choosing. I have written an onload event which changes the src of the iframe. However, for a split second you can see the page that the the submit returned before the page is redirected. I want to avoid the user seeing that other page even for a split second.

    Other than calling the redirect javascript from an onload event, is there another event I can use to avoid seeing the other page?

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Can we please see your code?
    Jeremy | jfein.net

  3. #3
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    function chgpage() {
    var iframeurl
    = (iframeForm2.location.href);
    var logurl = 'https://system.netsuite.com/core/media/media.nl?id=555&c=772390&h=18c090612029edad6b17&_xt=.htm';
    if (iframeurl == 'https://system.netsuite.com/pages/customerlogin.jsp?country=US')
    {document.getElementById('iframeForm2').src = logurl;}

    }




    <iframe id="iframeForm2" name="iframeForm2" src=" https://system.netsuite.com/core/media/media.nl?id=555&c=772390&h=18c090612029edad6b17&_xt=.htm" width="100%" height="1000" align="top" frameborder="0" scrolling="no" onload="chgpage();"> </iframe>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •