Jump to content

how to clear variables in url


Darkmatter5

Recommended Posts

I have  this script running

 

function reload(form, type) {
    var cab=form.cabinet_lst.options[form.cabinet_lst.options.selectedIndex].value;
    var fol=form.folder_lst.options[form.folder_lst.options.selectedIndex].value;
    var item=form.item_lst.options[form.item_lst.options.selectedIndex].value;
    if (type=="cab") { self.location='res_filing.php?cab=' + cab ; }
    if (type="fol") { self.location='res_filing.php?cab=' + cab +'&fol=' + fol ; }
    if (type="item") { self.location='res_filing.php?cab=' + cab +'&fol=' + fol +'&item=' + item ; }
}

 

I also have some PHP that run that puts a variable in the url named editcab.  When the reload javascript is activated the editcab variable is still passed, how can I clear all url variables, before running the self.location lines in the javascript?

Link to comment
https://forums.phpfreaks.com/topic/137710-how-to-clear-variables-in-url/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.