Quote: "ASP Sux, Php is OK, but ZOPE RULEZ!" Stoons (me) friday 8th dec. 2000. Q: Is it posible to get the current users SCREEN-RESOLUTION (without using Javascript!)..? Stoons = )
Q: Is it posible to get the current users SCREEN-RESOLUTION (without using Javascript!)..?
Since Zope is a server-side application, it is completely ignorant to client settings. It can get only variables from the HTTP environment settings. Since Javascript is a client side language, it can get client-specific information. Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development & Technical Project Management
In the code segment : <dtml-in expr="find_employee(employee_id='XXXXXXX')" size=50 start=query_start> <dtml-if sequence-start> How do I declare a variable such as intEmployee='123456' so that I can use it as: <dtml-in expr="find_employee(employee_id=<dtml-var intEmployee>)" size=50 start=query_start> <dtml-if sequence-start> What I am really tring to do is: <dtml-in expr="find_employee(employee_id='<dtml-var "AUTHETICATED_USER.getUserName()">')" size=50 start=query_start> <dtml-if sequence-start> But I keep on getting syntax errors. Mohan.
You can't have DTML inside DTML. The <dtml- stuff is to tell Zope that this is not HTML. The correct answer is: <dtml-in expr="find_employee(employee_id=AUTHETICATED_USER.getUserName())" size=50 start=query_start> cheers, peter ----- Original Message ----- From: Mohan Baro To: zope@zope.org Sent: Friday, December 08, 2000 1:53 PM Subject: [Zope] HELP! - DTML Variables In the code segment : <dtml-in expr="find_employee(employee_id='XXXXXXX')" size=50 start=query_start> <dtml-if sequence-start> How do I declare a variable such as intEmployee='123456' so that I can use it as: <dtml-in expr="find_employee(employee_id=<dtml-var intEmployee>)" size=50 start=query_start> <dtml-if sequence-start> What I am really tring to do is: <dtml-in expr="find_employee(employee_id='<dtml-var "AUTHETICATED_USER.getUserName()">')" size=50 start=query_start> <dtml-if sequence-start> But I keep on getting syntax errors. Mohan.
On Fri, 8 Dec 2000, Stoonsdesign wrote:
Q: Is it posible to get the current users SCREEN-RESOLUTION (without using Javascript!)..?
You can't, and you don't need. Even if you get the resolution, you'd have hard times generating HTML for that resolution: HTML is very bad concerning strict screen positioninig. HTML is not "publishing". Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Oleg Broytmann wrote:
On Fri, 8 Dec 2000, Stoonsdesign wrote:
Q: Is it posible to get the current users SCREEN-RESOLUTION (without using Javascript!)..?
You can't, and you don't need. Even if you get the resolution, you'd have hard times generating HTML for that resolution: HTML is very bad concerning strict screen positioninig. HTML is not "publishing".
I can imagine webpage which uses some Javascript to append information about resolution to the request as some parameter. Then you could use it, but it does not make too much sense. What if some people use your page through caching proxy, which serves it to a few guys without refetching it (yes, you can forbid caching). What if someone dynamically changes resolution (as I do with Ctrl-Alt-+ working on my XWindows Linux)? What if the client disables JavaScript?
participants (6)
-
Marcin Kasperski -
Mohan Baro -
Oleg Broytmann -
peter bengtson -
Stephan Richter -
Stoonsdesign