• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Capturing data

Capturing data 10 years 9 months ago #28197

  • robert.wooler
  • robert.wooler's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 1
i need to capture the platform / browswer and screensize for each submission, i can do a hidden field but i cant get the data to be its value any help?

It doesnt have to be hidden, we have no problem telling the user what iformation he/she is sharing, we are using the info for solving a few issues we have with submissions

Rob
The administrator has disabled public write access.

Capturing data 10 years 9 months ago #28281

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
You can use one of the following codes to capture screen size and browser:

jQuery version:
<script>
jQuery( document ).ready(function() {
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var x = navigator.userAgent;
    document.getElementById('hidden_field_name').value = w+" x "+h+" "+x;
});
</script>

MooTools version:
<script>
window.addEvent('domready', function() {
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var x = navigator.userAgent;
    document.getElementById('hidden_field_name').value = w+" x "+h+" "+x;
});
</script>

PS: For this script to work, you will have to create a hidden field
My help is not official customer support. To receive your support, submit a ticket by clicking here
Last Edit: 10 years 9 months ago by cosmin.cristea.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!