Re: URGENT : How to Detect screen resolution in COLDFUSION?

2002-03-24 Thread Critz
oi JAIME!! you cannot. coldfusion is a serverside language. Javascript is a clientside. You will need to pass the values from the client to the server. Then you can use them how you wish. -- Critz Certified Adv. ColdFusion Developer Crit[s2k] - - Sun

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2002-03-24 Thread Paul Giesenhagen
The only thing you can do is use Javascript to get the resolution and then stick it into a variable ... that may work. Paul Giesenhagen QuillDesign http://www.quilldesign.com SiteDirector v2.0 - Commerce Builder - Original Message - From: "JAIME HOI" <[EMAIL PROTECTED]> To: "CF-Talk" <[

RE: URGENT : How to Detect screen resolution in COLDFUSION?

2002-03-24 Thread JAIME HOI
i understand...but how can i set javascript into a coldfusion variable? -Original Message- From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 10:18 AM To: CF-Talk Subject: Re: URGENT : How to Detect screen resolution in COLDFUSION? The only thing you can do

RE: URGENT : How to Detect screen resolution in COLDFUSION?

2002-03-26 Thread Dave Babbitt
myHiddenField to see the value. Or, alternately you can POST the form and pick it up in Form.myHiddenField. Get it? Dave -Original Message- From: JAIME HOI [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 24, 2002 9:26 PM To: CF-Talk Subject: RE: URGENT : How to Detect screen resolution in CO

RE: URGENT : How to Detect screen resolution in COLDFUSION?

2002-03-26 Thread JAIME HOI
Thanks Dave for the script! I got it! -Original Message- From: Dave Babbitt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 3:06 AM To: CF-Talk Subject: RE: URGENT : How to Detect screen resolution in COLDFUSION? Hi Jaime! Any of these events (the body tag's onLoad

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-22 Thread The Dude
This should work nicely, tried out earlier today in Safari, Firefox and Chrome. Storing available vars in session for use throughout the app. My use case is loading a different include file that consumes smaller jpg files for a slider for mobile devices:

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-22 Thread Russ Michaels
Javascript is client side and will only run in the browser, you cannot run it from the server inside cfml. so will simply assign the text "document.write(screen.width);" to session.screenwidth not the value your are expecting. you need to run this script client side. document.write(screen.widt

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-22 Thread The Dude
I am running this in a cfml page and it returns the screen resolution consistently. I was surprised to see js scripts in cfset would capture the desired values in a cfml page. Try it on your end, technically it shouldn't work but I believe the virtual concurrency between server and client c

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Paul Kukiel
Impossible that it works as you describe. If anyone runs this code they will simple see a session variable with a string of js text. You would have to do it with ajax as suggested, or use js to set a form variable. On Sun, Dec 23, 2012 at 6:22 PM, The Dude wrote: > > I am running this in a

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
Have you actually tried it? >Impossible that it works as you describe. > >If anyone runs this code they will simple see a session variable with a >string of js text. > >"document.write(>screen.width);" /> > > >You would have to do it with ajax as suggested, or use js to set a form >variable. > >

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Paul Kukiel
Yes. On Sun, Dec 23, 2012 at 7:06 PM, The Dude wrote: > > Have you actually tried it? > > >Impossible that it works as you describe. > > > >If anyone runs this code they will simple see a session variable with a > >string of js text. > > > > >"document.write(>screen.width);" /> > > > > > >You w

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Kevin Pepperman
What is this "virtual concurrency between server and client call" stuff? I think I missed that in the instruction manual. Paul is correct, that output requires a DOM to run, CF is just seeing a text string. View source will also show you the output JavaScript. It is possible to pass those scre

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Andrew Scott
We don't need too... As Paul and the others have stated, that code sets a variable with the text between the quotes. Now if this is working for you, then maybe you can explain where you are overriding these variables using Ajax. Because as it stands, the only thing you will see when you dump the

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
Checkout this test page link: http://exelstudio.com/screensizetest.cfm Here's the code: Screen dimensions: #Session.Screenwidth# width X #Session.Screenheight# height Available browser width

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Kevin Pepperman
Just view the source, it is the JavaScript strings being parsed by the browser, CF has no Idea what the variables are. On Sun, Dec 23, 2012 at 3:24 AM, The Dude wrote: > > Checkout this test page link: > > http://exelstudio.com/screensizetest.cfm > > Here's the code: > > > "document.

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
I agree technically it should not work as one side is client, the other server, but on my test page it does present the js result value instead of the text string. Cfdump shows text strings, but within cfoutput tags seems to work showing the js results. A fluke :) I tried the form post option,

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
Dang, you're right, I didn't look at the source, just the page. Browser has it, cf doesn't. So ajax post is prob best solution, form post test works but not ideal. >Just view the source, it is the JavaScript strings being parsed by the >browser, CF has no Idea what the variables are. > > > > >>

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Kevin Pepperman
No, it is NOT showing the js result value instead of the text string, nor is this a fluke. CF is outputting the exact same string you set them to, the DOM in the browser is parsing the JavaScript so you see the variables. As I mentioned, if you view the source of the HTML you will see those strin

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
Agreed, I saw the results on the page but completely forgot to check the actual page source. Any idea on the best way to ajax post to cf in jquery? >No, it is NOT showing the js result value instead of the text string, nor >is this a fluke. CF is outputting the exact same string you set them to,

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Andrew Scott
Ok I see what you're doing now, the reason it works on the browser is that your placing (Or technically speaking injection JS into the Dom) JavaScript into the requested page. That means when it displays it will run that JS, but for ColdFusion to actually know about this, you have to get JavaScrip

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Kevin Pepperman
Its just the basics, but I am falling asleep. myData= "width=" + screen.width+ "&height="+screen.height; $.ajax({ type: "POST", url: "ajax.cfc?method=myMethod", data: myData, success: function(){} }); On Sun, Dec 23, 2012 at 3:43 AM, The Dude wrote: > > Agreed, I saw the results on the page b

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
Yes, it runs and displays client side but useless for any responsive conditional logic until that info is sent to cf. Will figure out how to get the values in jquery and ajax post to cf. I've been using Zurb Foundation as its really a quite pleasant grid for responsive layouts. You can apply m

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
Thanks for the example Kevin, trying it out right now. >Its just the basics, but I am falling asleep. > >myData= "width=" + screen.width+ "&height="+screen.height; >$.ajax({ >type: "POST", >url: "ajax.cfc?method=myMethod", >data: myData, >success: function(){} >}); > > > > >> ~~

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
Thanks guys for the jquery pointer, much appreciated. Got it working so the data is now in cfml via ajax. Page source got numbers vs string. Doh !! http://exelstudio.com/test5.cfm jquery ajax call: var theData= "screenWidth=" + screen.width+ "&screenHeight="+screen.height;

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Kevin Pepperman
Glad you worked it out. One thing you should do is make sure a session variable exists before using the session variables. When I first loaded the page I received an error, after I refreshed the error went away. You should cfparam the variables to a default first, otherwise they wont be set until

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Claude Schnéegans
>>When I first loaded the page I received an error, after I refreshed the error went away. This method won't work either, because the Ajax function will be executed after the output of the page is already on client side. This is why you get an error at the first call. So you have to call the t

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
I put a refresh tag below the script within conditions. It works, but still not ideal. It seems there's no way to avoid the 2nd step either redirect or form post. var theData= "screenWidth=" + screen.width+ "&screenHeight="+screen.height; $.ajax({ type: "POST", ur

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Kevin Pepperman
Add code in your Application.cfc onSessionStart() method, that makes sure the default session variables exist right when the session starts. You can also test for the session in onRequestStart() ,and call the onSessionStart() method if they don't exist. On Sun, Dec 23, 2012 at 8:51 PM, The Dude

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Claude Schnéegans
>>It seems there's no way to avoid the 2nd step either redirect or form post. The problem is not with using POST or GET, the problem is using Ajax. Ajax is good for many things, but not for this one. Just as you first attempt did, the Ajax call will be performed from client side, AFTER the temp

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread The Dude
Claude and Kevin, you are gentlemen and scholars. It worked with virtually negligible delay in the redirect. Its a workable solution for getting the screen vars and loading appropriate size jpg images on that basis for mobile. Thank you for your input. > >>It seems there's no way to avoid t

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread Steve Durette
One thing you may want to consider is giving the user an option. Sometime the user doesn't want your mobile version even though they are mobile. I find sites all the time where I'm given a mobile website that doesn't work as well as the desktop version. Sometimes even when they give me the opt

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-23 Thread .jonah
Good point. A simple unobtrusive way to do this is to provide a "Desktop Version" link in the footer of the mobile version which resets the session vars to desktop. Putting a popup or interstitial screen is pretty annoying in my pov and having a link in the footer is pretty common these days

RE: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread Rick Faircloth
What got you into using Javascript as opposed to CSS3 Media Queries for Responsive web design? Rick -Original Message- From: The Dude [mailto:exel...@gmail.com] Sent: Sunday, December 23, 2012 11:34 PM To: cf-talk Subject: Re: URGENT : How to Detect screen resolution in COLDFUSION

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread Russ Michaels
But you cannot get these values ntil after he page loads as they come from the dom, so using ajax is perfectly valid way to send dom data back to cf Regards Russ Michaels www.michaels.me.uk www.cfmldeveloper.com - Free CFML hosting for developers www.cfsearch.com - CF search engine On Dec 24, 201

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread The Dude
The website is the desktop version which adjusts nicely in the Zurb Foundation grid framework for phones. Only thing I'm doing is loading smaller size jpg images. Same proportion image, but smaller width hence smaller file size/faster download. For tablets desktop version looks/works fine.

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread The Dude
I use css media queries for layout, or more recently Zurb Foundation or Twitter Bootstrap, the former is much more elegant/intuitive grid, but Bootstrap has sexier looking eye candy ref buttons. However in this instance I need to load smaller set of jpgs for a slider viewed on a phone. jpg img

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread The Dude
Good idea, all it requires is a reset of the screensize session vars from the option link in the footer. My approach at the moment is coding responsive pages. Have any of you found a happy path to doing separate mobile versions other than phonegap/jquery mobile? >A simple unobtrusive way to do

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread The Dude
Actually I can respond to id's and classes based on screen size via css media queries but can't get the specific values to store in cf. Btw, here's an interesting site just on media queries, lets you try out tests: http://cssmediaqueries.com/ ~~

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread Claude Schnéegans
>>But you cannot get these values ntil after he page loads The page loads but reloads immediately sending the values in the same time. It is still a two steps process, but in this case, the first step is automatic and transparent to the user. >>so using ajax is perfectly valid way to send dom

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread Claude Schnéegans
>>Its a workable solution for getting Now, the trick I gave was only to deal with the specific problem as you defined it, but there would be an even better solution. I suppose the user has to go through some other page before he gets images. So why not simply transmit the screen size before wit

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread Russ Michaels
This is the point in ajax, to send.data.from client side to server side. Its not magic, it works like an iframe. Regards Russ Michaels www.michaels.me.uk www.cfmldeveloper.com - Free CFML hosting for developers www.cfsearch.com - CF search engine On Dec 24, 2012 1:58 PM, <> wrote: > > >>But you

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread Claude Schnéegans
>>This is the point in ajax, to send.data.from client side to server side. May be, but the point is still that when Ajax does it, the page that needed the data is already at client side, so it is too late. For sending data to the server, there is still good old FORMs. Ajax is more useful to get

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread Russ Michaels
I think your still not understanding the power of AJAX. You can use AJAX to completely build a page on the fly, client send data to server server sends data back to client client renders page according to data it received back from server. so it matters not that the page did not know the info wh

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread Claude Schnéegans
>>I think your still not understanding the power of AJAX. I think you still don't understand the point that Ajax is simply not the best solurion in this instance. >>You can use AJAX to completely build a page on the fly, Yes, of course you can, but when you can do better and simpler not usin

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread Russ Michaels
Regards Russ Michaels www.michaels.me.uk www.cfmldeveloper.com - Free CFML hosting for developers www.cfsearch.com - CF search engine On Dec 24, 2012 3:12 PM, <> wrote: > > > >>I think your still not understanding the power of AJAX. > > I think you still don't understand the point that Ajax is si

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread The Dude
I wish that were an option, unfortunately this is for a fairly elaborate full width slider on the home page of the website. Its the first thing you see. Its like a regular slider with about 10 images, but goes full width on available screen space. So unless we did a welcome page, that wouldn'

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread The Dude
Hi Russ, so if we: 1. Go by ajax to a server cfc via client, 2. Server cfc returns the vars back to client Is there then a way to save the vars that came back to the client from the server cfc into cf session scope, all in the same single page call? >I think your still not understanding the

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-24 Thread The Dude
Hi Claude, perhaps the only way to do it with ajax in a 1 step process is to send the screen size vars to the cfc, then based on the results from the cfc have js append something to the image source path so a different set of image files loads. Btw, have you looked into Angular or Knockout, an

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-25 Thread Claude Schnéegans
>>Hi Claude, perhaps the only way to do it with ajax in a 1 step process is to >>send the screen size vars to the cfc, then based on the results from the cfc >>have js append something to the image source path so a different set of >>image files loads. Probably, if you absolutely want to u

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-25 Thread Claude Schnéegans
>>Is there then a way to save the vars that came back to the client from the >>server cfc into cf session scope, The best would be to save it while still on the server from the cfc. But you must make sure the session Id is transmitted to the cfc, otherwise it will define a new session.

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-25 Thread Andrew Scott
That's why the WURFL project is the best option, you can also scale the layouts you use as well. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Tue, Dec 25, 2012 at 12:45 PM, The Dude wrote: > > I wish that were an opt

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-26 Thread Al Musella, DPM
How about just straight javascript... detect the screen resolution and document .write the source of the images based on the screen resolution ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusio

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-26 Thread Eric Roberts
Not sure if someone suggested it or not, but .net can access computer info...I wonder if there is a .net object out there that can read that? On Dec 25, 2012 9:25 AM, <> wrote: > > >>Hi Claude, perhaps the only way to do it with ajax in a 1 step process > is to send the screen size vars to the

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-26 Thread Phillip Vector
This seems very off the topic of the subject of ColdFusion. Can you guys perhaps take it off list? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Arc

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-26 Thread anene . quorium
I've received over 20 mails on this topic, since its creation. Is it that no one can provide an answer for it or what --Original Message-- From: Phillip Vector To: cf-talk@houseoffusion.com ReplyTo: cf-talk@houseoffusion.com Subject: Re: URGENT : How to Detect screen resoluti

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-26 Thread Phillip Vector
sage-- > From: Phillip Vector > To: cf-talk@houseoffusion.com > ReplyTo: cf-talk@houseoffusion.com > Subject: Re: URGENT : How to Detect screen resolution in COLDFUSION? > Sent: Dec 27, 2012 5:00 AM > > > This seems very off the topic of the subject of ColdFusion

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-26 Thread Eric Roberts
Accessing .net objects or using JavaScript with ColdFusion is hardly off topic. Just answer the question or delete the emails. Quit bitching about it. This used to be a very friendly forum On Dec 26, 2012 10:01 PM, "Phillip Vector" wrote: > > This seems very off the topic of the subject o

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-26 Thread Phillip Vector
It seems however that it went from talking about using Javascript with Coldfusion to using Javascript by itself.. On Wed, Dec 26, 2012 at 10:08 PM, Eric Roberts wrote: > > Accessing .net objects or using JavaScript with ColdFusion is hardly off > topic. Just answer the question or delete the em

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-27 Thread The Dude
You mean a javascript if/else condition to defined what gets loaded? >How about just straight javascript... detect the screen resolution >and document .write the source of the images based on the screen resolution ~| Order t

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-27 Thread Claude Schnéegans
>>It seems however that it went from talking about using Javascript with Coldfusion to using Javascript by itself.. So what ? This forum is for CF users. Are you a CF user who does not use Javascript? ~| Order the Adobe Coldf

Re: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-27 Thread Phillip Vector
There are other lists for discussing Javascript. I also use C#. Should I start discussing C# code in here? It was a polite request. Apparently, not everyone feels the same way, so I retract it. Sorry for suggesting that we discuss.. you know.. Coldfusion. :) On Thu, Dec 27, 2012 at 8:52 AM, <>

RE: URGENT : How to Detect screen resolution in COLDFUSION?

2012-12-28 Thread Eric Roberts
If C# has a solution that CF cannot readily provide and pertains to accessing it via CF...yes -Original Message- From: Phillip Vector [mailto:vec...@mostdeadlygame.com] Sent: Thursday, December 27, 2012 11:23 AM To: cf-talk Subject: Re: URGENT : How to Detect screen resolution in