Create a New Account        Home  |  Contact  |  Login           

Zrinity is the leader in enterprise-class email marketing management solutions and content management solutions for marketing professionals and developers worldwide.
Products Services Solutions Support Resources Partners Company

Zrinity provides email marketing appliances and software to large businesses and advertising agencies. Zrinity's email delivery systems are very reliable and high-speed.

Get Query String variables in JavaScript

Use Java Script to get access to the query string
<script>
function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
  alert('Query Variable ' + variable + ' not found');
}
</script>

Now make a request to page.html?x=Hello

<script>
  alert( getQueryVariable("x") );
</script>


More Code Samples



  


Email Marketing Best Practices Blog

home products services partners company support contact my account

Copyright 2006 © Zrinity Inc. All rights reserved.     View our privacy policy         July 8, 2008