Solved

Send page to Top Frame

Posted on 2000-03-08
3
187 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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wrapper for APPs 9 76
How to make this slider behave as it should with javascript 5 28
how can i count words? 2 42
Performance for Office 365 6 46
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

785 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