It's inline in the cfwindow. I want to allow previous/next navigation
inside the cfwindow, and resize the window based upon the size of the image
that's being loaded in the cfwindow. Complete code for the cfwindow page
(getAlbum method returns the data stored for the images in an album, and
includes the image name):
<cfscript>
if (isUserInRole("Administrators,Contributors")) {
tmp.show_all = 1;
} else {
tmp.show_all = 0;
}
</cfscript>
<cfparam name="url.albumid" default="0">
<cfparam name="url.row" default="0">
<cfinvoke component="#request.app.sql_cfc_path#.album" method="getAlbum"
returnvariable="getAlbum">
<cfinvokeargument name="show_all" value="#trim(tmp.show_all)#">
<cfinvokeargument name="albumid" value="#trim(URL.albumid)#">
</cfinvoke>
<cfoutput>
<cfloop query="getAlbum" startrow="#url.row#" endrow="#url.row#">
<cfset img = imageRead(expandPath("/site/images/album/#getAlbum.photo#"))>
<cfset imgInfo=imageInfo(img)>
<script language="javascript">
ColdFusion.Window.getWindowObject('albumwin').resizeTo(#imgInfo.width#,#imgInfo.height#);
</script>
<a href="?albumid=#url.albumid#&row=#url.row + 1#"><img
src="/site/images/album/#getalbum.photo#" /></a>
</cfloop>
</cfoutput>
On Mon, Oct 18, 2010 at 10:12 AM, morgan l <[email protected]> wrote:
>
> Where does this js code reside? Are you trying to do this inline in the
> cfwindow's source code, or calling it as a function?
>
> Are you getting any js errors (use Firebug in Firefox to get good js error
> information)?
>
> I use the resizeTo() method, and the code you provided looks like it should
> work fine, so I have to suspect that your js isn't firing properly.
>
> On Sun, Oct 17, 2010 at 8:16 PM, Pete Ruckelshaus <[email protected]
> >wrote:
>
> >
> > Yes, and I'm using imageInfo() to grab the dimensions of the image (the
> x,y
> > dimensions in the resizeTo()).
> >
> > On Sun, Oct 17, 2010 at 9:13 PM, Michael Grant <[email protected]> wrote:
> >
> > >
> > > Just to make sure, do you have that wrapped in cfoutput?
> > >
> > > On Sun, Oct 17, 2010 at 9:08 PM, Pete Ruckelshaus <
> > [email protected]
> > > >wrote:
> > >
> > > >
> > > > I'd like to be able to dynamically resize a ColdFusion window created
> > > with
> > > > cfwindow. I haven't found anything definitive as to whether this is
> > > > possible; I did try the following:
> > > >
> > > > [script language="javascript">
> > > >
> > > >
> > > >
> > >
> >
> ColdFusion.Window.getWindowObject('albumwin').resizeTo(#imgInfo.width#,#imgInfo.height#);
> > > > [/script>
> > > >
> > > > (script tags broken intentionally). This doesn't seem to work. Is
> > there
> > > a
> > > > way to do this?
> > > >
> > > > Thanks,
> > > >
> > > > Pete
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338300
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm