Hola
Is there anyway to make a single selectbox execute/pass vars. to PHP without submitting the form.
I know its a server/client side problem but still, if somebody has any ideas on how to make it work, it be great
Funny you should ask, we've only just recently been chatting about the very subject over the in echo lounge.
check it out
hehe, how hard can it be to pass vars from client to server without submitting.
im tinkering with a something to make java reload the page with extra params.
Well, actually, pretty damned hard before the introduction of the XMLHttpRequest javascript object was introduced.
function showgalleri() { if(document.getElementById('group').value > 0) { window.location.href = 'main.php?action=redigergalleri&id='+document.getElementById('group').value;; } }
and a $_GET['id'] somewhere to pick it up
<form action="address" method="post"> <select name="name" size="1" onchange="this.form.submit()"> <option value="">Select</option> <option value="value1">Value 1</option> <option value="value2">Value 2</option> </select> </form>
Oh, I see what you're getting at now. Sorry, I got the wrong end of the stick there. I guess I've just got XMLHttpRequest on the mind at the moment, it's exciting stuff.