469,275 Members | 1,806 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

load a page in different frame using href in anchor tag

54
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_bottom" 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 2283
hsriat
1,654 Expert 1GB
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
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

Post your reply

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

Similar topics

4 posts views Thread by John Beschler | last post: by
1 post views Thread by jake_allen_no_spam | last post: by
1 post views Thread by Frances Valdes | last post: by
5 posts views Thread by Mariame | last post: by
3 posts views Thread by Queez | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.