sabecs
asked on
PHP variable - assign a value Using JavaScript
Hi,
How do I reload a page so that I can set a PHP variable?
The code below triggers when a checkbox is checked, I then need to reload the page to set a PHP variable.
function pickup(pickup){
if (pickup.checked == 1){
document.getElementById('s howmessage ').style.d isplay = 'none';
document.getElementById('s howbuttons ').style.d isplay = 'inline';
//code to reload page here and POST or GET a variable that I can pickup and assign using PHP
}else {
document.getElementById('s howmessage ').style.d isplay = 'inline';
}
}
Thanks in advance for your feedback.
How do I reload a page so that I can set a PHP variable?
The code below triggers when a checkbox is checked, I then need to reload the page to set a PHP variable.
function pickup(pickup){
if (pickup.checked == 1){
document.getElementById('s
document.getElementById('s
//code to reload page here and POST or GET a variable that I can pickup and assign using PHP
}else {
document.getElementById('s
}
}
Thanks in advance for your feedback.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
window.location.href = "your page url";
function pickup(pickup){
if (pickup.checked == 1){
document.getElementById('s howmessage ').style.d isplay = 'none';
document.getElementById('s howbuttons ').style.d isplay = 'inline';
//code to reload page here and POST or GET a variable that I can pickup and assign using PHP
window.location.reload(tru e);
}else {
document.getElementById('s howmessage ').style.d isplay = 'inline';
}
}
if (pickup.checked == 1){
document.getElementById('s
document.getElementById('s
//code to reload page here and POST or GET a variable that I can pickup and assign using PHP
window.location.reload(tru
}else {
document.getElementById('s
}
}
ASKER
Thanks shinuq.