JS = SIFR toggle / reload
- Started
- Last post
- 2 Responses
- Mojo
I'd like to have a single link to refresh toggle sIFR ( using sIFR.preferenceManager.disable... ) but I'm no JS coder.
This is what I've pieced together but without result. I just want to make a simple function that will run either of the enable/disable functions based on an if statement which should correspond to checking the sifr cookie (i'll worry about this later). After it runs a command, I'd like it to refresh the page.
var sifr_id = new Boolean(true);
var sURL = unescape(window.location.pathnam...function toggleSIFR(){
if(sifr_id == true){
//
sIFR.preferenceManager.disable...
window.location.href = sURL;
}else{
//
sIFR.preferenceManager.enable();
window.location.href = sURL;
}
}If anyone would like to write this for me properly, I'm all ears ;)
- Mojo0
Oh, I just got it, apart from the checking sifr cookie bit..
- neverblink0
you can access cookies with javascript through document.cookie