/    Sign up×
Community /Pin to ProfileBookmark

When it will open new window, how to go back to start

I have link and when user clicks on link in index page it will be opened new window. How to go on index page when user clicks on logo image in this new window?

to post a comment
HTML

9 Comments(s)

Copy linkTweet thisAlerts:
@go2dougJan 05.2006 — I have link and when user clicks on link in index page it will be opened new window. How to go on index page when user clicks on logo image in this new window?[/QUOTE]

Greetings comrade, you must link logo image to index page. Look at example:

<i>
</i>&lt;a href="index.html"&gt;&lt;img src="logo.gif" /&gt;&lt;/a&gt;
Copy linkTweet thisAlerts:
@toplisekauthorJan 06.2006 — This will not work. It should go back to old window
Copy linkTweet thisAlerts:
@abhish_dagaJan 06.2006 — <a href="index.html" target="_blank"><img src="logo.gif" /></a>

it open index page in new window on the click of logo
Copy linkTweet thisAlerts:
@toplisekauthorJan 06.2006 — this will do the following:

_blank renders the link in a new, unnamed window

I need to go back to old first window (base).
Copy linkTweet thisAlerts:
@deraJan 06.2006 — <a href="index.html" target="base"><img src="logo.gif" /></a>
Copy linkTweet thisAlerts:
@toplisekauthorJan 06.2006 — This is also not working. How to name target in the base window?
Copy linkTweet thisAlerts:
@oldmanJan 14.2006 — If you want to use javascript you can call window.opener to reference the original window
Copy linkTweet thisAlerts:
@toplisekauthorJan 14.2006 — How is code as I do not know with JavaScript if e.g. base window is with name base
Copy linkTweet thisAlerts:
@WebJoelJan 14.2006 — If the new page opens in a new window, merely create a link in this now page to include (either text and/or image), and add this:

[CODE]onclick="history.go(-1)"[/CODE]

So it would maybe look like

[CODE]<a href="_target"><img src="images/goback.gif" onclick="history.go(-1)" /></a>[/CODE]
The image "goback.gif" could be an arrow or pointer, etc., suggesting navigation backwards.

I think that this might work (I haven't tried it myself), -try it and see.

The user's browser does the work. It should take you back to the last viewed page, no matter what the 'previously-viewed page' was... (This assumes that the user has javascript ability turned on).

-Joel
×

Success!

Help @toplisek 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 6.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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...