Click to See Complete Forum and Search --> : iframe back button


dave2k
September 25th, 2006, 06:18 AM
hi guys, trying to add a button which controls my iframe by creating back and forward buttons. the following works in firefox but not ie<a href="#" onClick="frames['all'].history.go(-1);">back</a> i have set the name and id of the frame to all, but i get a javascript error in ie saying access is denied.

Any ideas?

PeejAvery
September 25th, 2006, 10:01 AM
Access denied usually means that you are attempting to work with a web page that your client does not have access to script to. Is one of your frames loaded a website from some www address?

Well, personally I would use...
parent.history.go(-1)

dave2k
September 25th, 2006, 11:05 AM
your wrong.

iframe is an inner frame, i want to control an inner frame from a page which holde it

PeejAvery
September 25th, 2006, 01:57 PM
your wrong.
I don't think you have ever shown optimism towards me. I misread your post and saw frame not iframe.

Anyway, when working with iframes, you can just use...
<a href="#" onClick="FRAMENAME.history.go(-1);">back</a>