I did a bunch of searches but couldn't find any help.
I'm getting an error on my indexof in IE7, works fine in Firefox/etc.
here's the code:
var prefix = "";
var relative = document.getElementById('url').value;
if(relative.indexOf("http")<=0) {
prefix = "}
window.open(prefix + relative);
It is the indexOf that is causing the error. Any help rewriting this code please?
I'm getting an error on my indexof in IE7, works fine in Firefox/etc.
here's the code:
var prefix = "";
var relative = document.getElementById('url').value;
if(relative.indexOf("http")<=0) {
prefix = "}
window.open(prefix + relative);
It is the indexOf that is causing the error. Any help rewriting this code please?