/    Sign up×
Community /Pin to ProfileBookmark

Back And Forward Buttons For Iframes

? [SIZE=2]Hi, again!

I am trying put a back and forward buttons to move the html pages within an IFRAME.

I found this script for working with screens. How I can change it for running under IFRAME?[/SIZE]
<SCRIPT LANGUAGE=”JavaScript”>
<!– hide this script tag’s contents from old browsers
function goHist(a)
{
history.go(a); // Go back one.
}

</script>
</head>
<body>
<FORM METHOD=”post”>
<INPUT TYPE=”button” VALUE=” BACK ” onClick=”goHist(-1)”>
<INPUT TYPE=”button” VALUE=”FORWARD” onClick=”goHist(1)”>
</form>

<a href=”” onClick=”parent.history.back(); return false;” onMouseOver=”self.status=’Back’; return true;”><img src=”D:IMAGENSimage_buttonbb_3b[1].gif” border=0></a>
<a href=”” onClick=”parent.history.forward(); return false;” onMouseOver=”self.status=’Forward’; return true;”><img src=”D:IMAGENSimage_buttonbotao seta.jpg” border=0></a>

Thank you

Regards

E. Letchev

to post a comment
JavaScript

11 Comments(s)

Copy linkTweet thisAlerts:
@UltimaterMay 08.2005 — parent.frames[0].location.go(-1)

parent.frames[0].location.go(1)
Copy linkTweet thisAlerts:
@Lebron_LetchevauthorMay 08.2005 — I did in this way...

<a href="" onClick="[B]parent.frames[0].location.go(-1);[/B]

return false;" onMouseOver="self.status='Back'; return true;"><img src="D:IMAGENSimage_buttonbb_3b[1].gif" border=0></a>

<a href="" onClick="[B]parent.frames[0].location.go(-1);[/B]

return false;" onMouseOver="self.status='Forward'; return true;"><img src="D:IMAGENSimage_buttonbotao seta.jpg" border=0></a>

But after display an error message it open another window with 'about page'.

Do you know which is the problem?

Thank you

E Letchev
Copy linkTweet thisAlerts:
@Lebron_LetchevauthorMay 08.2005 — Sorry...

<a href="" onClick="[B]parent.frames[0].location.go(-1);[/B]

return false;" onMouseOver="self.status='Back'; return true;"><img src="D:IMAGENSimage_buttonbb_3b[1].gif" border=0></a>

<a href="" onClick="[B]parent.frames[0].location.go(1);[/B]

return false;" onMouseOver="self.status='Forward'; return true;"><img src="D:IMAGENSimage_buttonbotao seta.jpg" border=0></a>
Copy linkTweet thisAlerts:
@UltimaterMay 08.2005 — <i>
</i>&lt;a
href="javascript:void(parent.frames[0].location.go(-1))"
onMouseOver="self.status='Back'; return true;"&gt;
&lt;img src="D:/IMAGENS/image_button/bb_3b[1].gif" border=0&gt;
&lt;/a&gt;
Copy linkTweet thisAlerts:
@UltimaterMay 08.2005 — Just outta curiosity, do you understand this:

[b]?&#1488;&#1514;&#1492; &#1502;&#1491;&#1489;&#1512; &#1506;&#1489;&#1512;&#1497;&#1514;[/b]
Copy linkTweet thisAlerts:
@Lebron_LetchevauthorMay 08.2005 — Swearword?

E Letchev
Copy linkTweet thisAlerts:
@UltimaterMay 08.2005 — Nope, I was asking if you spoke Hebrew in Hebrew.

I thought there was a good chance that you did becuase your last name has a high change of being Jewish.
Copy linkTweet thisAlerts:
@Lebron_LetchevauthorMay 08.2005 — I am not Jewish? Nor Arab!

Letchev is the union of the article "Le" (french) more "Tchev" from "Tche" (Spanish)

Lebron? it is a 'loan'.

Well... Regarding our question "the back" button returns not to prior page, it open a window and in address bar show: 'javascript:void(parent.frames[0].location.go(-1))'

Thank you for your patience!

Lebron Letchev
Copy linkTweet thisAlerts:
@UltimaterMay 08.2005 — <i>
</i>&lt;input type="button" onclick="parent.frames[0].location.go(-1)" value="back"&gt;
Copy linkTweet thisAlerts:
@Lebron_LetchevauthorMay 09.2005 — Hi,

The problem persists...

for example:

step

opening pages inside IFRAMES

It is I want: step by step (see [6])

[B]

1. www.yahoo.com

2. Choice a keyword

3. it open several pages separated by 10/100 links each page? You can move up and move down among these pages. Ok?

4. You 'click' a link or choice a link.

5. You enter in that page - for example, the page of the Liverpool FC!

6. Now you want return to 'YAHOO RESULT PAGE' or 'GOOGLE results page'

HOWEVER, you will see not the head of IE - BACK - FORWARD BUTTONS - so you cannot return to 'yahoo result page' HERE IS MY PROBLEM! [/B]
Thank you
Copy linkTweet thisAlerts:
@UltimaterMay 09.2005 — Sorry, once the IFRAME has yahoo's URL, it's in a different domain.

So... as a security issue, cross-domain scripts don't work.
×

Success!

Help @Lebron_Letchev spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...