/    Sign up×
Community /Pin to ProfileBookmark

open a pop-up window when a link is clicked.

Hi,

On my page, I would like to create a link that pops-up a window containing a page of mine. How can i do that in php ?

thanks for your help to the dumby !

patrick

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@ShmohelOct 12.2006 — Actually. do it with HTML:

<a href='MyLinkHere' target='_blank'>click me!</a>
Copy linkTweet thisAlerts:
@bokehOct 12.2006 — <a href='MyLinkHere' target='_blank'>click me!</a>[/QUOTE] [B]Do not use[/B] target="_blank"

Always provide a meaningful name to your target attribute and try to reuse such target attribute in your page so that a click on another link may load the referenced resource in an already created and rendered window (therefore speeding up the process for the user) and therefore justifying the reason (and user system resources, time spent) for creating a secondary window in the first place. Using a single target attribute value and reusing it in links is much more user resources friendly as it only creates one single secondary window which is recycled. On the other hand, using "_blank" as the target attribute value will create several new and unnamed windows on the user's desktop which can not be recycled, reused. In any case, if your code is well done, it will not interfere with the user's final choice but will rather merely offer him more choices, more ways to open links and more power to the tool he's using (a browser).
Copy linkTweet thisAlerts:
@felgallOct 12.2006 — Opening a new page is a behaviour of the page rather than content. That is why the target attribute is deprecated. The latest thinking on web page design is to separate content, appearance, and behaviour and use the language designed to provide that part of the web page design.

HTML for content

CSS for appearance

Javascript for behaviour
Copy linkTweet thisAlerts:
@bokehOct 12.2006 — Javascript for behaviour[/QUOTE]On that note... [code=html]<a
href="http://url/"
onclick="return !window.open(this.href, 'WindowName')"
onkeypress="return !window.open(this.href, 'WindowName')"
>Anchor text</a>[/code]
×

Success!

Help @patimages 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,
)...