Jump to content

Search the Community

Showing results for tags 'local time'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. My 1st post. I'd like to place the user's local time (obtained via javascript) into a ProcessWire php variable. I've tried using $session: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="<?php echo $config->urls->templates?>scripts/jquery-1.4.2.min.js"></script> <script type="text/javascript"> document.ready = function() { var visitortime = new Date(); "<?php echo $session->time; ?>" + "=" + visitortime; }; </script> </head> <body> <?php $t = $session->time; echo $t; ?> </body> </html> and $input with a hidden form submitted by javascript: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="<?php echo $config->urls->templates?>scripts/jquery-1.4.2.min.js"></script> <script type="text/javascript"> document.ready = function () { var visitortime = new Date(); document.getElementById("utoffset").setAttribute("value",visitortime); document.getElementById("utoffset").submit(); } </script> </head> <body> <form action="." method="post"> <input type="hidden" id="utoffset" name="vt"> </form> <?php echo $input->post->utoffset; ?> </body> </html> Both display blank pages (using the above .php files as templates). Does anyone see what I'm missing? Or is there an easier way? Completely baffled.
×
×
  • Create New...