not sure why you'd do that on the client, but assign a function to
window.onload
something like ....

        (function() {
            var oldonload = window.onload,
                func = function() {
                    // redirect here...
                };
            if (typeof window.onload != 'function') {
                window.onload = func;
            } else {
                window.onload = function() {
                    if (oldonload) {
                        oldonload();
                    }
                    func();
                }
            }
        })();

I'm kind of new on the list so am willing to be corrected.
Strictly speaking, this is a javascript question - and belongs elsewhere.
You might want to search stackoverflow.com for answers - or even google/bing
-
they reliably lead me to stackoverflow for most questions I have.

-shishir


On Fri, May 6, 2011 at 5:38 PM, Resa <taratbr...@gmail.com> wrote:

> mean i am in index.html and it had a javascript function that holds
> redirect to physics.html...
> when i load index.html it doesn't go to index.html  at all it skips it
> and executed physics.html.. do u understand?
> so when the page is loaded it executes the JavaScript without it being
> called
>
> On May 6, 7:25 pm, Shishir Ramam <sra...@gmail.com> wrote:
> > http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-p...
> >
> > On Fri, May 6, 2011 at 5:21 PM, Resa <taratbr...@gmail.com> wrote:
> > > how can i redirect  to another page in a JavaScript function without
> > > executing it until the function is actually called???
> >
> > --
> > Imagine there were no hypothetical situations.
>



-- 
Imagine there were no hypothetical situations.

Reply via email to