Click to See Complete Forum and Search --> : input=button/oclick=window.open/REFRESH???


nasosl
11-26-2003, 03:33 PM
I have in a php page (let's say main.php) some buttons like this (no frames):

<input type="button" name="bbutton" value="Browse database" onClick="window.open('main.php?fuction=browse','_top')">

In the 'browse' page (which is a function in the same php file), the user sees all the contects of the database and has the ability with a similar javascript button to 'insert new rows'. The user is transfered to a different part of the same php file, stores the new data and returns automatically to the main menu. In the main menu when he presses again the 'Browse' button he sees the data before the last 'submit' action in the form. When I refresh manually the page (F5 in IE) everything works fine.

Is there a way each time the user presses a button, the page which is called to be refreshed automatically?

Thank you in advance!

gil davis
11-26-2003, 04:13 PM
<input type="button" onclick="window.location.reload(true)" value=" Refresh ">

nasosl
11-27-2003, 12:07 AM
I don't want to have a 'refresh' button, but the page loaded when the button is pressed to be a refreshed one.

fredmv
11-27-2003, 12:11 AM
Try this:<input type="button" onclick="w=window.open('foo.html','','');w.window.location.reload(true);w.focus();" value="bar" />

nasosl
11-28-2003, 02:41 AM
Originally posted by fredmv
Try this:<input type="button" onclick="w=window.open('foo.html','','');w.window.location.reload(true);w.focus();" value="bar" />

This one looks interesting, and it 'partialy' worked. But how do I tell the browser to open 'foo.html' in the same window and not a new one?