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

havent tested fully, but maybe something like this?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 } )

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.

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!!!

views:1396 update:2011/9/26 15:43:22
corona forums © 2003-2011