Greg,
This may be a little tricky. CF is a server-side technology: it
creates HTML (or other text response), and delivers it to the client.
In other words, it can create JavaScript, but JavaScript can't talk to
it: JavaScript is a client-side technology.
One way to do this would be to use JavaScript to redirect to a page,
passing the width in the URL.
Example:
Page 1:
<script>
// stuff to get width results in variable named "myWidth"
document.location("page2.cfm?width=" + myWidth);
</script>
Page 2:
<cfif not isDefined("url.width") or not isNumeric(url.width)>
<cflocation url="page1.cfm" addToken="no" />
</cfif>
<cfoutput>
<div style="width:#url.width#px">
...stuff...
</div>
</cfoutput>
Cheers,
Joe
On Tue, 26 Oct 2004 07:17:01 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> I have JS function to get the screen available width.
> I need to either put that in a CF variable
> or use it in the <div style=""> directly.
> Maybe this is real easy and I'm just missing the obivious
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.houseoffusion.com/banners/view.cfm?bannerid=11
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182589
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54