webPopup 'back'

I know this has been asked about several times, so apologies for repeating it.

However, I am desperately looking for a solution or workaround. Surely someone knows of a way? I saw a post thast mentioned using ‘/history(-1)’ but i haven’t had any success with this. If anyone knows of a way to do this I would be extremely grateful if they would share it here.

Thanks [import]uid: 61520 topic_id: 14310 reply_id: 314310[/import]

havent tested fully, but maybe something like this?

[lua]local history = {}
local x = 1
local function webListener(event)
local url = event.url
table.insert(history,url)
print(#history)
end

local back = display.newRect(50,50,100,80)
back:setFillColor(255,255,255)

local function backtap()
native.cancelWebPopup()
native.showWebPopup( (history[x-1]), { hasBackground=true, urlRequest=webListener } )
print(history[x-1])
x = x + 1
end

back:addEventListener(‘tap’, backtap )

x = x + 1
native.showWebPopup( “http://www.anscamobile.com/”, { hasBackground=true, urlRequest=webListener } )[/lua] [import]uid: 24641 topic_id: 14310 reply_id: 52846[/import]

Thanks for your reply berty. I haven’t managed to get this working yet. I’m wondering if it’s because I am first loading local html files, then navigating to external webpages…
I will keep trying and update this post when I am succesful. [import]uid: 61520 topic_id: 14310 reply_id: 53894[/import]

This isn’t really working out. In principle it works but when an external site loads, google for example, the listener registers 2 events and store 2 identical url’s in the history array. For a site that is optimised for mobile there are 3-4 events tracked. This is so frustrating. If only Corona had a decent WebView!!! [import]uid: 61520 topic_id: 14310 reply_id: 54026[/import]