Anyway loading the page without showing it?

Discussion in 'Javascript' started by benny, Oct 12, 2004.

  1. benny

    benny Guest


    I have a web pageA, that include the javascript, to do some onload
    event so that it would load another web pageB to perform some onload
    Could I able to load the pageB without showing it ? Or while loading
    pageA I would load the pageB onload event using javascript?
    I have one method i.e. <body onload=""",
    height=0, ... )>
    but once I have popup-blocker on browser I wont be able to achive that
    Anyone could give me suggestion ?


    benny ;)
    benny, Oct 12, 2004
    1. Advertisements

  2. benny

    Randy Webb Guest

    Load PageB in a hidden IFrame.
    Randy Webb, Oct 12, 2004
    1. Advertisements

  3. benny

    Fred Oz Guest

    If all you want is to access a function, why not put it into a JS file
    and call it directly? Unless the page you are trying to access isn't
    Yes, the trivial case:

    <body style="display: none;">

    But then you end up with an empty window and are still defeated by
    pop-up blockers.
    Again, put the function into a JS file, then the same code is avaialble
    to both pages. I'm struggling with the concept of loading an HTML page
    for the sole purpose of running a JavaScript function.

    Perhaps I am missing the point of what you are trying to do...

    Cheers, Fred.
    Fred Oz, Oct 12, 2004
  4. benny

    kuok benny Guest

    loading an HTML page for the sole purpose of
    Your suggestion is good. However, multiple functions or procedure I
    wrote are on the pageB.
    Basically, I need to wrote a javascript that could call
    pageB' function or procedure(not using javascript) rather than wrote
    another set of functions in javascript on pageA.
    My idea is to load the pageB's functions or procedures on pageA by using
    sth like onload event on pageA.
    kuok benny, Oct 13, 2004
  5. benny

    Randy Webb Guest

    To repeat what Fred said, and I don't think you understood.

    Take the script that is in pageB, put it into an external .js file, then
    include it in both pages:

    <script type="text/javascript" src="myJSCode.js"></script>
    Randy Webb, Oct 13, 2004
  6. benny

    kuok benny Guest

    Randy wrote:-
    <script type="text/javascript" src="myJSCode.js"></script>


    let say I put the
    <script type="text/javascript" src="myJSCode.js"></script> on page
    e.g. My question is inside myJSCode.js,
    anyway to wrote the function for me to redirect to another url e.g. such that this process would
    pass parameter value to page without
    loading the page itself ?

    Thanks in advance.


    benny ;-)
    kuok benny, Oct 13, 2004
  7. benny

    Randy Webb Guest

    No. Because to initiate visit.aspx, you *must* request it from the
    server. That means you "load" it. Whether in a hidden frame, or via an
    HTTPRequest Object, hidden IFrame, or however, you must load it.
    Randy Webb, Oct 13, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.