[RESOLVED] change META refresh based on form value
I'm building a feedback system with real-time feedback (kinda like a one-sided chat room) & I need to know how to change the refresh rate of a META refresh based on the number in a form.
Basically:
- META refresh starts at 5 seconds
- If somebody changes the number in the form, the refresh rate changes (ie: from 5 seconds to 10 seconds)
I'm not sure if this can be done with javascript, or PHP, but I need it.
Unfortunately it didn't work, maybe because I'm not doing it right.
Here's the form:
<input type=text name="rate" id="rate" size="3" value="5">
And your JavaScript:
<script type="text/JavaScript">
window.setTimeout('window.location="location"; ',document.getElementById['rate'].value);
</script>
If there's something I'm doing wrong, please tell me.
Bookmarks