Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Template in a Frame

Status
Not open for further replies.

Kush

Programmer
Sep 20, 2000
24
0
0
US
I am writing a ColdFusion application and am using Javascript within it. I am working with 2 frames on my window and have the following two problems.

1. I have a <CFERROR TYPE=&quot;Request&quot; TEMPLATE=&quot;temp.cfm&quot;> in my application.cfm. It's template is currently opening in the frame which is causing the error. I want it to open in the whole window. How can I do this using Javascript?

2. In one of my frames, I am using a <FORM> tag which when submitted should display another template in the same frame. Here is the code:

<FORM METHOD=&quot;Post&quot; ACTION=&quot;Action.cfm&quot; TARGET=&quot;rightFr&quot;>
<INPUT TYPE=&quot;Submit&quot; Value=&quot;Send&quot; >
</FORM>

Somehow, &quot;TARGET&quot; is not doing the job. Any thoughts?

I would appreciate any ideas/suggestions.
Thanks.



 
Try the following

Item 1

To force a page to open outside a frameset

Code:
<script LANGUAGE=&quot;JavaScript&quot;>
   if(top.location != document.location.href) 
   {
     top.location = 'pagename.cfm';
   }
</script>
Item 2

Try removing the target, the page should open in the current frame


Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top