Jump to content

ldonop

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by ldonop

  1. translate my code please; javascript to php. very very very very thanks. <form> <input type="checkbox" name="myfilter" value="+abst">Amytag1 <input type="checkbox" name="myfilter" value="+mini">Amytag8 <input type="checkbox" name="myfilter" value="+popa">Amytag9 <input type="checkbox" name="myfilter" value="+impr">Amytag13 <input type="checkbox" name="myfilter" value="+green">Amytag15 <input type="checkbox" name="myfilter" value="+gh5">Amytag18 <input type="checkbox" name="myfilter" value="+gh4">Amytag19 <input type="checkbox" name="myfilter" value="+gh3">Amytag34 <input id="search1" placeholder="Word Search..." value=""> <input id="year1" placeholder="Year" value=""> <input id="month1" placeholder="Month" value=""> <input id="day1" placeholder="Day" value=""> <input id="mymenu" value=""> </form> <button onclick="myFunction()" class="Sbutton">search it</button> <script> function myFunction() { var myfilter = document.forms[0]; var txt = ""; var i; for (i = 0; i < myfilter.length; i++) { if (myfilter[i].checked) { txt = txt + myfilter[i].value; } var year = "&year=" + document.getElementById("year1").value; var month = "&month=" + document.getElementById("month1").value; var day = "&day=" + document.getElementById("day1").value; var search = "&s=" + document.getElementById("search1").value; var tag = "/?tag=" + document.getElementById("mymenu").value; } var zzz = "http://test.com/category/art" + txt + tag + year + month + day + search; window.location.assign(zzz) } </script> and please, not use this way: header("Location: {$target}"); exit; Because it doesn't work on my site (for some reason). p.s: I have a lot of checkbox.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.