Real Time Updates
Moderator: General Moderators
Real Time Updates
I have a form that allows a visitor to make selections from drop down boxes, click a submit button, and have the total of there selections updated on the same page. I want to make this a real time update that is done without having to click a button to update. How can this be done? I have been told it can be done with Sessions, and I have also been told it would have to be done using a client-side javascript. I would prefer to use PHP because this is what I am trying to learn. I have not been able to find any relevant examples of PHP or Java. Any direction would be greatlt appreciated.
-
PAW Projects
- Forum Commoner
- Posts: 30
- Joined: Tue Jun 15, 2004 7:43 am
- Contact:
It can be real time by using a hidden IFRAME.
On selection of one of the options in the dropdown, a javascript file is loaded into the IFRAME, which in turn changes the content of the page.
With or without the use of PHP, JavaScript is going to be involved.
On selection of one of the options in the dropdown, a javascript file is loaded into the IFRAME, which in turn changes the content of the page.
With or without the use of PHP, JavaScript is going to be involved.
Last edited by PAW Projects on Wed Jun 16, 2004 4:28 pm, edited 1 time in total.
i am not good with javascript, but here goes...
something like that
, shouldt work (if it does, yay for me), but it should give you a idea it.
Code: Select all
<script>
function lable(value)
{
document.layer.bla.text = value;
}
</script>
<layer name="bla"></layer>
<form name="form">
<select name="options" onchange="lable(this.value)">
<option value="value 1">value 1</option>
<option value="value 2">value 2</option>
</select>
</form>