Javascript GoBack function in Weblet -- Solution --

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AndyP
Posts: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Javascript GoBack function in Weblet -- Solution --

Post by AndyP » Wed Nov 24, 2010 12:38 pm

Hi All, I recentlly answered a question in the nabble revolution forums which I thought may be of use?
Thread source http://runtime-revolution.278305.n4.nab ... 56710.html

Copied below:

Q. I used Livecode to create a web stand-alone. Fantastic! Only one problem, on the first card is a quit button. How do I script it so that it will in fact go back 1 page as a web page.
In other words a script that does this "<INPUT TYPE="button" VALUE="Back" onClick="history.go(-1);return true;">"

My reply:

This will do the job

on mouseUp
do "history.go(-1)" in browser
end mouseUp

I've put a demo here:

http://www.2108.co.uk/Rev/Tests/Javascr ... -test.html
Andy .... LC CLASSIC ROCKS!

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Javascript GoBack function in Weblet -- Solution --

Post by jmburnod » Wed Nov 24, 2010 1:03 pm

Hi,

It work for me
firefox 3.0.1 & powerbook g4 OSX 10.4.2

All the best

Jean-Marc
https://alternatic.ch

Post Reply