473,763 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
+ 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 3522
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**********@h otmail.com> wrote in message
news:11******** ************@f1 4g2000cwb.googl egroups.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
4306
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
5541
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 runs. I tried to define another Button with an EventHandler associated, and from this (after doing my code) fire 'btnSearch.click()'. But I can't make it work. I tried private void Button1_Click(object sender, System.EventArgs e RestartAll()...
6
2730
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 datagrid which is populated with list of report names. When the user click on the name of a report, I display a panel that has a button which on clicking will run the report. The report will open in ReportViewer.aspx, This page has a Report Document...
4
1454
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) End if Script is a variable that is filled from calling a function that filles in all the assigned variables for the new window to open.
8
1681
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 ever I click the link button the window pops up with the string passed to it but it gets minimised automatically. Even using win.focus() does'nt seem to stop it from minimising. How can I stop this from happening
1
5407
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 that), the popup window will have also a text box and a button. when the User click on the button the value on the textbox will be send back to the textbox on My_WUC. I hope I was clear off what I want to do. I've been searching for some ideas...
9
4922
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 fine from a link. The button does bring up the popup window, but when I press the links on the page, it doesn't return or close the window. ****************************************************************************
1
1851
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 aspx page name.. i am clicking the second page link the second page is opened..
3
2960
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 2008 as well) If I put a breakpoint in a .js file, the debugger picks it up and breaks into it at that point.
0
9563
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9383
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9992
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9935
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9819
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7364
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5268
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3916
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2790
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.