Getting client's date and time
Hello, I'm looking for a quick solution to get the client's date and time in a wicket modal, without a post I can have a wicket component, like a label and I can use js functions to set it in a span for example. The question is... how can i read that value I set in js in wicket? Is it possible? Thanks in advance, Cristi
Re: Getting client's date and time
On 3/21/08, Cristi Manole [EMAIL PROTECTED] wrote: Hello, I'm looking for a quick solution to get the client's date and time in a wicket modal, without a post I can have a wicket component, like a label and I can use js functions to set it in a span for example. The question is... how can i read that value I set in js in wicket? Can you write the value to a hidden form field? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting client's date and time
yes, i can, but how can i read it without post? it doesn't even need to be hidden as i want it shown... i just want to query it from time to time., again - without a post. is it possible to read it through ajax or from the dom... or something, inside wicket? On Fri, Mar 21, 2008 at 2:21 PM, James Carman [EMAIL PROTECTED] wrote: On 3/21/08, Cristi Manole [EMAIL PROTECTED] wrote: Hello, I'm looking for a quick solution to get the client's date and time in a wicket modal, without a post I can have a wicket component, like a label and I can use js functions to set it in a span for example. The question is... how can i read that value I set in js in wicket? Can you write the value to a hidden form field? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting client's date and time
On 3/21/08, Cristi Manole [EMAIL PROTECTED] wrote: yes, i can, but how can i read it without post? it doesn't even need to be hidden as i want it shown... i just want to query it from time to time., again - without a post. is it possible to read it through ajax or from the dom... or something, inside wicket? Could you have a completely hidden form? Just create a simple form that just has that hidden field in it. Then, post it using Ajax. I'm just thinking out loud here, but it might just be crazy enough to work. :) Disclaimer: This advice has been given before I've had my morning coffee. It has been given as-is with no warranty, neither expressed nor implied. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting client's date and time
On 3/21/08, James Carman [EMAIL PROTECTED] wrote: On 3/21/08, Cristi Manole [EMAIL PROTECTED] wrote: yes, i can, but how can i read it without post? it doesn't even need to be hidden as i want it shown... i just want to query it from time to time., again - without a post. is it possible to read it through ajax or from the dom... or something, inside wicket? Could you have a completely hidden form? Just create a simple form that just has that hidden field in it. Then, post it using Ajax. I'm just thinking out loud here, but it might just be crazy enough to work. :) Perhaps you could snoop their browser as in this example (look at the bottom of the page): http://www.wicketstuff.org/wicket13/hellobrowser - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting client's date and time
now that was a great tip :) thanks for reminding me... i knew about this feature... i even used it in a previous project... wicket can gather a lot of browser settings including time :) for ppl also looking for this, don't forget to put this into your WebApplication class: getRequestCycleSettings().setGatherExtendedBrowserInfo(true); Thanks again, James :) Cristi On Fri, Mar 21, 2008 at 2:32 PM, James Carman [EMAIL PROTECTED] wrote: On 3/21/08, James Carman [EMAIL PROTECTED] wrote: On 3/21/08, Cristi Manole [EMAIL PROTECTED] wrote: yes, i can, but how can i read it without post? it doesn't even need to be hidden as i want it shown... i just want to query it from time to time., again - without a post. is it possible to read it through ajax or from the dom... or something, inside wicket? Could you have a completely hidden form? Just create a simple form that just has that hidden field in it. Then, post it using Ajax. I'm just thinking out loud here, but it might just be crazy enough to work. :) Perhaps you could snoop their browser as in this example (look at the bottom of the page): http://www.wicketstuff.org/wicket13/hellobrowser - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]