Hi !
I have the following function :
Code: 
<script>function hide(){
var str=document.location.href;
if(str.indexOf(\"?to=\"))
{document.getElementById('vip').style.display='none';}
}</script>
I am trying to hide an object if in the url contains '?to=' .
But this one is hiding it always.
Any help ?
Porsche_maniak Reviewed by Porsche_maniak on . [JS] indexof prob Hi ! I have the following function : <script>function hide(){ var str=document.location.href; if(str.indexOf(\"?to=\")) {document.getElementById('vip').style.display='none';} }</script> I am trying to hide an object if in the url contains '?to=' . But this one is hiding it always. Rating: 5