1
tigums
Getting a user's resolution at registration
  • 2004/6/6 22:14

  • tigums

  • Just popping in

  • Posts: 8

  • Since: 2004/5/30


At this time I have my registration setup such that they can enter their resolution manually and it will input that into my altered xoops_users table.

However, I would like to automate the process of getting thier resolution at registration. Javascript provides screen.width and screen.height, I don't know if there is a way to pass those javascript variables into the pphp code though.

I followed this guide to hack the registration, http://claude.felix.chez.tiscali.fr/tuto/hack_form_inscr_bil.htm, and that set everything up for people to be able to enter their resolution.



In class/xoopsform/themeform.php the form is 'rendered',so I added
le="color: #000000"><?php <script language="Javascript">document.write('<input type='hidden' name='resolution' id='resolution' value="'+screen.width+'x'+screen.height'" />');</script>


before the </form> in there. I thought that would work.. but it didn't.

Does anyone have any insight on doing something like this?

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!