Creating Conditional Statement Based On Page URL
May 24, 2013 in answer
ANSWER:
you can try:
var str = window.location; // get the current URL;
var el; // cache element;
if(srt.indexOf('lights-out') > -1)
el = document.getElementById("input_1_11");
} else if(srt.indexOf('growth-web') > -1)
el document.getElementById("input_2_6");
else if(srt.indexOf('growth-iphone') > -1)
el = document.getElementById("input_3_6");
if(el)
el.value = latitude;

New Comments