On 20 Jan 2006, at 00:48, Brian Heibert wrote:
Hi,
I am trying to make back & forward buttons for my project
I am using the HTMLViewer control
Here's what I have so far
dim saveurl as string
saveurl = gofield.text
if gofield.text <> saveurl then
//saveurl = gofield.text
gofield.text = saveurl
viewer.htmlviewer1.loadurl gofield.text
else
end if
It doesn't work I want to be able to save the last address entered
in the gofield (edit field)
and go back to that address if the back button was pressed
Any comments, suggestions, ideas welcome
Hi Brian,
Where are you putting that code?
You're going around in circles with that local saveurl variable.
Instead, create a property on the window (probably want an array or
something) and use that to hold the previous url (say, BackArray() As
String).
In your Back button pop the last url off of the BackArray into your
editfield and then load your url from it.
Don't forget to Append the last url to the BackArray when you get a
page load (in it's simplest form just do it from DocumentComplete and
then double-pop in the back button as you'll have appended the
current url too).
That should get you started.
--
Ian M. Jones
___________________________________
http://www.imijsoft.com
http://www.ianmjones.net (blog)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>