firefox problem in back button effect in iframe window

I have a container window that contains an iframe with id "if1". In the container page I have a back button that should work on the iframe window; I am using the following code:
<a href='javascript:window.frames["if1"].history.go(-1);'><img src="images/back.gif" alt="Back" width="50" height="25" border="0"/></a>
it is working fine with IE ... but it does not work with firefox!
Who is Participating?
That's correct ClickCentric - the name must be set too.

Also, if you have no luck there, try the 'back' method instead:

<a href='javascript: window.frames["if1"].history.back();'>Back</a>
You say you gave the iframe the id "if1", but I think for that method to work in firefox, the name also has to be "if1".
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.