Yea, I know it isn't the best, but was in a hurry to get it to work.
I have a page, user_input.cfm. That has buttons that opens the same page user_input.cfm without the toolbars and such to make this resizeable and small for the customer.
function opensmall(Qid,shift_name)
{
var windowX = (window.screen.width-740)/
2;
var windowY = (window.screen.height-550)
/2;
var sendstr = "user_input.cfm?shift=" + Qid + "&shiftname=" + shift_name ;
temp = window.open(sendstr,"test"
," width=1020, height=260,resizable=YES, scrollbars=YES");
temp.moveTo(windowX,window
Y);
}
So now they have the small window open. Now on this page also has buttons that open another window that does the action, when they click on the page.
function user_insert(Qid,Comments)
{
var windowX = (window.screen.width-740)/
2;
var windowY = (window.screen.height-550)
/2;
var sendstr = "user_insert.cfm?Qid=" + Qid + "&Comments=" + Comments ;
inserts = window.open(sendstr,"test"
," width=400, height=260,resizable=YES, scrollbars=YES");
inserts.moveTo(windowX,win
dowY);
}
The user_insert.cfm page runs the query and closes. The only problem is it closes both itself, and the page that opened it, the small window. I just want it to close itself, Not the small window.
<CFQUERY name="main_insert">
INSERT INTO ..........................
</CFQUERY>
<SCRIPT LANGUAGE="JavaScript1.2">
self.close();
</SCRIPT>
Help.
So you have a main page(user_input.cfm), small window(user_input.cfm), and the insert page(user_insert.cfm). But I only want the user_insert.cfm page to close only itself.
Start Free Trial