By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,241 Members | 760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,241 IT Pros & Developers. It's quick & easy.

Javascript function opens wrong .aspx page

P: n/a
Hello all,

I'm having an issue with the following:

I have an .aspx page with two html links that call distinct Javascript
functions.

I also have an iframe in the html of this .aspx page. The Javascript
functions are supposed to redirect the iframe to a new page (different
page for each link).

Here's my problem-

The first one works fine (ie. it loads the correct page into the
iframe. However, the 2nd simply will not load the page I want it to. It
instead loads a completely different page.

I have tried making the Javascript function load a page other than the
'problematic' one and that works fine.

Can you think of a reason that would cause this behavior? It appears to
be an issue with the specific .aspx page that I am trying to load...

Here's the function I'm using in Javascript (ClassInfo is the id of the
iframe):

function register()
{
document.frames["ClassInfo"].location.href = "Register.aspx";
}

Any suggestions and help are much appreciated!

Thanks again-
Jeff

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
It sounds like one link is doing a PostBack and the other simply navigation.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"jeff_m" <je**********@hotmail.com> wrote in message
news:11********************@f14g2000cwb.googlegrou ps.com...
Hello all,

I'm having an issue with the following:

I have an .aspx page with two html links that call distinct Javascript
functions.

I also have an iframe in the html of this .aspx page. The Javascript
functions are supposed to redirect the iframe to a new page (different
page for each link).

Here's my problem-

The first one works fine (ie. it loads the correct page into the
iframe. However, the 2nd simply will not load the page I want it to. It
instead loads a completely different page.

I have tried making the Javascript function load a page other than the
'problematic' one and that works fine.

Can you think of a reason that would cause this behavior? It appears to
be an issue with the specific .aspx page that I am trying to load...

Here's the function I'm using in Javascript (ClassInfo is the id of the
iframe):

function register()
{
document.frames["ClassInfo"].location.href = "Register.aspx";
}

Any suggestions and help are much appreciated!

Thanks again-
Jeff

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.