Time:
Scotland: Sat, 6:39 am
Rhode Island: Sat, 1:39 am
Florida: Sat, 1:39 am
New Mexico: Fri, 11:39 pm
California: Fri, 10:39 pm

Click here to visit Livelife365.com

Click here to visit nmdarts.com



Buy this Ad Space.

180px wide.

Please get in touch with KH@ if you are interested and make an offer.

Selanac Embroidery and Screen Printing

Embroidery
Screen Printing
Signs and Banners
Promotional Advertising

WEBSITE

Contact Paul Canales
TEl: USA 732-901-8417
CELL: USA 732-773-1339


Please click here for more information


For continued disscussion on this topic : msgwindow question


dfred
08-06-2001, 08:31 PM
I am trying to find out the difference between a msgwindow and a remotewindow?
I have a Cold Fusion page that uses JS to open a remote window. When the data is submitted to an action page, I try to go the a menu and select another option. the page for that option is suppose to open in that browser, but it is opening in a new browser window. I think it has something to do with using a remote window but cannot seem to find out.
there is a lot going on on the page so I have no code attatched.

Hope someone can enlighten me.

DAN

Vincent Puglia
08-06-2001, 08:53 PM
Hi dfred,

"remotewindow" and "msgwindow" are not technical javascript terms; however, I presume 'remotewindow' is being used to mean a 'child' window; that is, a window that is opened with the 'window.open()' command. Using that command will usually open a new browser window.
Now, as for your problem:

the page for that option is suppose to open in that browser, but it is opening in a new browser window.

check your menu and see if the option you selected triggers a function that calls "window.open(some information)". Something like:
window.open("pagename.html","", .......);

if it does and if 'pagename.html' is supposed to be opened within the already opened browser window, you probably need to change the code to:

location.href = "pagename.html";

I cannot be certain, though, since I have no code to look at. If you want to try it, comment out the old line and type in the new. If you don't get the result you want, revert back to the original and post a url.

Vinny

dfred
08-06-2001, 09:07 PM
here is the code I am using now:

// The remote launching code.
function makeRemote(lc) {

remote = window.open("red_reason_popup.cfm?comp_condition="+lc,"remotewin","width=500,height=400,chrome=yes, scrollbars=yes");
//Changed name to "main" to avoid confusion with "opener"
self.name = "main";

if (remote.opener == null)
remote.opener = self;
}


here is the code I was using before a lot of JS code was added to do what I needed:

<SCRIPT LANGUAGE="JavaScript">
<cfoutput>

function NewWindow#compcounter#()
{
msgWindow=window.open("red_reason_popup.cfm?ID=comp_condition#compcounter#","displayWindow","toolbar=no,width=450,height=280,directories=no,status=no,scrollbars=yes,resize=no,menubar=no")
}
</cfoutput>
</SCRIPT>

before I used the top code with all my other JS code, I had a few lines of JS code and the second window code. I did not have any problems with the second code...it would open things up in the same window. now the new code opens things up in a new window. Can you tell me what is the main difference between the two code strings.

thanks

DAN

Vincent Puglia
08-06-2001, 09:42 PM
Hi Dan,

Going back to the original question (remote vs msg): Both terms are being used as 'labels' that is 'variable names' Deep down there is no difference.
The only difference between the 2 code snippets you pasted is the parameter you are calling the cfm with. if the first case, you call it with 'lc' and in the second you call the same page with 'loopcounter'.
I have no idea what that coldfusion page is doing, but in all likelihood the second case is closing the original page and then opening the new one, thereby making it appear as though it were displaying the new data in the same window. I suspect this in part because of the 'opener...'

the window.open() accepts the following parameters in the following order:

1) page2open
2) name of window
3) style/feature information
4) replace boolean