client side to back end - or what to do with back button?
Posted: Tue Jan 24, 2006 10:15 pm
Hello,
I have to link my client-side (javascript) with back-end (php, MySQL). Let say, when I choose a new value in pull-down list, I want the back end to display something based on this new value.
So I have pull-down list with onchange() :
<select onchange="update_display(this);" ...>
...
</select>
I also have a frame for updating script :
<iframe name="update_frame" ... src="update.php">...</iframe>
And JavaScript
function update_display( me )
{
var url = 'update.php?'+me.value;
var f = self.frames['update_frame'];
f.location = url;
return true;
}
Everything works - but when I click back button in IE - it rolls back update.php in the frame first instead of rolling back the main page.
I do understand frames are not the best solution, but may be there is a work around?
Sincerely,
Tim Kinder
I have to link my client-side (javascript) with back-end (php, MySQL). Let say, when I choose a new value in pull-down list, I want the back end to display something based on this new value.
So I have pull-down list with onchange() :
<select onchange="update_display(this);" ...>
...
</select>
I also have a frame for updating script :
<iframe name="update_frame" ... src="update.php">...</iframe>
And JavaScript
function update_display( me )
{
var url = 'update.php?'+me.value;
var f = self.frames['update_frame'];
f.location = url;
return true;
}
Everything works - but when I click back button in IE - it rolls back update.php in the frame first instead of rolling back the main page.
I do understand frames are not the best solution, but may be there is a work around?
Sincerely,
Tim Kinder