473,466 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Javascript function opens wrong .aspx page

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
1 3506
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jm | last post by:
I have a parent window: <script language="javascript"> function doSearch() { result=showModalDialog("searchmni.aspx?lastname=smith"); alert(result); } </script>
4
by: Carlo Marchesoni | last post by:
I have a button that opens a new Window (some kind of search-window), which is fired using JavaScript (btnSearch.Attributes=".....";) Now I need to run some code behind code BEFORE this JavaScript...
6
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a...
4
by: Brian Shannon | last post by:
I have a javascript function that is executed when a link button is clicked: If Not (Page.IsClientScriptBlockRegistered("PopupWindow")) Then Page.RegisterClientScriptBlock("PopupWindow", Script)...
8
by: Terry | last post by:
I am loading a javascript function from my asp.net app. This function loads a string passed to it in a new window. I register the function to activate on click of an asp linkbutton. Now when...
1
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
1
by: thirunavukarasukm | last post by:
I have a link wich opens a the second page with links wich call a javascript function. I have some problem with javascript. i am two aspx page.. in my first aspx page contain the second...
3
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, This is an issue that happens to me and everybody else I know and I've never found a way around it. In Visual Studio (currently using 2003 but the same has happened for me in 2005 and...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.