You are trying to mix client side and server side scripting all at the same
time. All the javascript code to determine the browser width, etc. will not
be processed by CF at all. Assignment of JS variables to the attributes
scope and then to the caller scope just is not going to work. You will need
to have a page run at the browser that will provide the information you want
back to the CF server for use.
DC
----- Original Message -----
From: "Christine Kelley" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, June 07, 2001 18:39
Subject: Re: Browser window width
> Hi!
> I went to Javascript.com for the tutorials, but I'm still having
> problems. I need to get the document width and use it right away by CF.
> Here's what I tried:
>
> Custom Tag called Documentwidth.cfm
>
> <SCRIPT language="JavaScript">
> if ((navigator.appVersion.charAt(0) == "4")
> ||(navigator.appVersion.charAt(0) == "5")) {
> if (navigator.appName == "Netscape")
> browser="netscape";
> else if (navigator.appName=="Microsoft Internet Explorer")
> browser="ie";
> else alert("This document requires a 4.0 or later browser.");
> }
>
> if (browser=="netscape") {
> attributes.documentwidth=document.innerWidth;
> }
>
> if (browser=="ie") {
> attributes.documentwidth=document.Width;
> }
>
> caller.documentwidth=attributes.documentwidth;
> </script>
>
> Calling Template
>
> <cf_documentwidth>
> <cfoutput><cfset session.DocWidth=#variables.documentwidth#></cfoutput>
>
> Error it's giving
>
> Error resolving parameter VARIABLES.DOCUMENTWIDTH
> The specified variable name cannot be found. This problem is very likely
due
> to the fact that you have misspelled the variable name.
>
> Help! I'm not sure what is going wrong :(
> Thanks, Christine
>
>
>
> ----- Original Message -----
> From: "Michael Lugassy" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, June 07, 2001 8:59 AM
> Subject: Re: Browser window width
>
>
> > go to javascript.com
> > search for tips on browsers
> > you will find good tutorials.
> >
> > Thanks,
> >
> > Michael
> > ----- Original Message -----
> > From: "Christine Kelley" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Thursday, June 07, 2001 1:55 AM
> > Subject: Browser window width
> >
> >
> > > Hi all!
> > > I am having trouble determining the width of the browser
> > > window. I checked the Developers Exchange where I found a
> > > cool tag that gives the screen width, but in this instance I
> > > need the browser window width in case the user resizes :)
> > > Any ideas?
> > > Christine
> > >
> > >
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists