Solved

Send page to Top Frame

Posted on 2000-03-08
3
190 Views
Last Modified: 2012-08-13
I have the following javascipt, how can I get this page to open in the top frame?

<script language="JavaScript">
function submitform() {
        document.FmRouter.action="../Charts/IT_Customers_Rtr.cfm?Router=#Form.SelRouter#&TimeSpan=#Form.TimeSpan#"
       document.FmRouter.submit();
     return true;
   }  
</script>
0
Comment
Question by:cb1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 2596709
In the form tag, set the target attribute:

<FORM name='FmRouter' target='NameOfYourTopFrame' action='whatever' method='post'>

.... just don't name your top frame "top" because that is a javascript keyword.
0
 
LVL 8

Expert Comment

by:xabi
ID: 2596712
document.FmRouter.target = "_top"

xabi
0
 
LVL 8

Accepted Solution

by:
xabi earned 50 total points
ID: 2596724
<script language="JavaScript">
function submitform() {
        document.FmRouter.action="../Charts/IT_Customers_Rtr.cfm?Router=#Form.SelRouter#&TimeSpan=#Form.TimeSpan#"
document.FmRouter.target = "_top"
document.FmRouter.submit();
     return true;
   }    
</script>

xabi
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question