Link to home
Create AccountLog in
Avatar of greeneye8
greeneye8

asked on

Cold Fusion and opening a new sized window

I am trying to use Cold Fusion to open up a 'new window" within my Cold Fusion application.  I have several Java scripts I have used for HTML sites to open up new windows, but the scripts do not seem to work for calling up a new window to a certain size within my cold fusion application.  I do undertand that CF is a sever side application unlike Java with runs on the client side.

Is there a CF tag to achieve this  possibly? If so, how?

Currently, in my head tag I am using this:

<script>

function schools(){
schoolsWindow = window.open ("http://www.mydomain.com/schools.cfm?page=1021","books","scrollbars=yes,width=591,height=528");
}
</script>

then in my text, I have this:

To view the schools click <a href="javascript:schools()">here:</a>

However, CF will not open up  schools.cfm?page=1021 because it is a dynamic page.

Is there a special CF tag that will allow me to open up a new "sized" window to a dyamic page within my website?

Thanks




Avatar of rob_lorentz
rob_lorentz

think you are missing a ;

<a href="javascript:schools();">here:</a>
Avatar of greeneye8

ASKER

The semi does not enable the script to work.  The script works fine and I have been using it for years with html pop ups with the semi:

a href="javascript:schools()">here:</a>

The problem with Jave is that I don't think it can pass Cold Fusion variables through it.  So my question is, can Cold Fusion even do this.... open up a controlled window (size, scrolling, etc.) within a Cold Fusion application?

Here is an example of what I am trying to do:  If you visit:

http://icarealty.com/index.cfm

This is a CF site.  If you scroll down to the very bottom, I have a link on the right hand side called 'test'.  Currently that is linking over to another dynamic page on the site.  What I am trying to figure out is how can I make my 'test' link  or another link on that site open up a "new window" that I can control the size and other attributes of the window.  

Thanks
First of all, forcing a popup window on a user is an unfortunate UI decision.  That being said, the least you could do is make it so JavaScript isn't required to access the contents of the link.

http://jeffhowden.com/articles/links_and_javascript/

Second, JavaScript doesn't care what server-side language a particular link calls just as much as your server-side language of choice cares that it was requested by a browser (in a popup or not), HTTP analysis tool, a server process, etc.

Perhaps you could help the experts assisting with your question by giving a more accurate description of the problem than simply saying "CF will not open up ... because it is a dynamic page".  Are you getting a JavaScript error when clicking on the link?  Does the popup open?  If it opens, what are you seeing in the popup window?  Is it not the page you expected?  Does it result in a ColdFusion error?  Have you tried opening the link in a regular window?  Do you get the same or different results than when attempting to open it in the popup?
ASKER CERTIFIED SOLUTION
Avatar of Teggert
Teggert

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
For more information on window.open and what features you could pass,
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.