473,672 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

load a page in different frame using href in anchor tag

54 New Member
Hello,
I'm loading a frame from another frame using anchor tag.
the code is as folllows.

Expand|Select|Wrap|Line Numbers
  1.  function change_page
  2. {
  3.         if(document.form.txtbx1.value=="all")
  4.        {
  5.          document.getElementById('a_link').target="right_bottom";
  6.      document.getElementById('a_link').href="results.html";
  7.        }else
  8.        {
  9.           alert("message ");
  10.        }
  11. }
  12.  
  13.  
Expand|Select|Wrap|Line Numbers
  1. <a name="a_link" >Call Page</a>
  2. <button type='text' name='txtbx1'/>
  3.  
here "right_bott om" is the name of the frame where i want to load the page.
the problem i'm facing is. when i call the function if the condition in if is true it calls the page by replacing the page that is present at the 'roght_bottom' frame. if the condition is not satisfied it doesn't change the page only if the condition was not met earlier.
i mean if the right_bottom page was replaced earlier , irrespective of whether the condition is met the right_bottom frame is loaded with the new page 'results.html' which i dont want please tel me the solution.
is the page being stored when the condition is met and it is being flashed even on not meeting the condition??????
thanks in advance
Feb 25 '08 #1
2 2485
hsriat
1,654 Recognized Expert Top Contributor
Add return false; after alert("message "); in the same loop.

and add onclick="return change_name()" in the link tag.
Feb 25 '08 #2
sindhu
54 New Member
thanks alot
it works,
works fine

Add return false; after alert("message "); in the same loop.

and add onclick="return change_name()" in the link tag.
Feb 25 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
3813
by: John Beschler | last post by:
I'm developing a framset with links in the top frame that I want to use to position the page in the bottom frame to a certain anchor. Problem is the page in the bottom frame is an ASP page. Any help? Thanks, John
1
1593
by: jake_allen_no_spam | last post by:
Hi All, I am working on a web page with frames, "menuFrame" on the left and "textFrame" on the right. When I load the menu on the left I would like to load the text with a default page on the right. Is there some kind of way to do this with an onload event in the menuFrame page? mymenu.html <body onload(window.load("mytext.html","textFrame"))>
1
6260
by: Robert Mark Bram | last post by:
Hi All, We are using a scrolling iFrame to present a list of options to the user within the main page with an anchor against each option. Depending on the user actions, we jump to an anchor in the frame with code like this: theFrameSrc = theFrame.src; theFrame.src = theFrameSrc + "#" + anchorName;
1
10439
by: Leon | last post by:
From parent windows, I have created a popup windows that comprises two frames. When I have clicked a link button in one of the frames, I would like to redirect the parent windows to somewhere. So I did ------------------------------------------------------------------ <a href='#' onclick='window.opener.location.href =""http://www.google.com"";'>Click here</a> ------------------------------------------------------------------
1
1201
by: Frances Valdes | last post by:
I have been struggling with this and would be really grateful if anyone could help. I have a page with 2 frames. I would like to use the page load event on the left hand page to use a variable to change the page in the right frame. On the left page it would look something like: Private Sub Page_Load etc dim NewHtmlPage as string
5
1051
by: Mariame | last post by:
Hi Everyone, I have a frameset Web Page contains 2 frame , first one have a banner, logo and menu second frame called "content" and it appears in it all page in site is it possible that i send a url that opens a choosen page in the content frame or i have always to open the default page that called in framset Thx in Adv
5
5698
by: Simon Benson | last post by:
Probably a fairly simple problem but one that's been plaguing me for a couple of days... can anyone help? I have a classic ASP page with a number of text boxes which are updatable. For convenience I want to add 'tabs' at the top of the page (like a card index) as the data to be displayed is split into specific groups (client, company, preferences, events). How do I update any changes to the data and switch to a different page - at
3
6661
by: Queez | last post by:
Very quick question. I have a master page (M1) and three content pages (C1, C2, C3). In M1, there's a list of three anchors (A1, A2, A3) which point towards the three content pages. The anchors have some CSS to make them look pretty. I'd like to be able to dynamically set the CSS for A1 when I navigate to C1 so it looks slightly different to the other two (e.g. to indicate this is the currently selected item). Below is what I have so...
0
8488
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
8411
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
8832
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...
0
8686
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...
0
7449
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4424
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2821
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
2
1821
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.