How can I reload a sql query in the same page without opening a new page and using a submit button?
Nov 28th, 2008 11:15
healthy man, Mariusz Stankiewicz, lone wookie,
I don't know what you mean by 'reloading' a sql query in the same
page. As HTML dosn't talk to a SQL Server and is a client side markup
language rather than a server side scripting language. (I've found a
lot of people have this problem on this forum)
What you could do, and what I have done very successfully on many
occasions is create an invisible <IFrame> (or a <frame>/<frameset>)
which can be named your 'update frame' on the page.
When you click your Submit button, the target of the form is set to
your 'update frame', a PHP file is loaded into the update frame and
frame that your original HTML page is on.
Realistically if you had a div tag for the entire page, you could
rewrite the entire page using the frameidname.innerHTML attribute.
tell the user their settings were updated etc, without having to reload
There are many examples of such implementations on the net, a popular
one is bikepoint.com.au, they use this to create a more dynamic search
(they use <frame> tags for compatability), where you choose an option
from a drop-down box, and another dropdown box is updated with items
within the first drop-down box's group.
It gets quite complicated, as this moves into dynamic generation of
don't grasp the concept of client/server languages).