NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need some JS / HTML help

Néstor rotsen at gmail.com
Sat Dec 22 17:47:22 EST 2007


Here is an ezample on how to do it with a popup but I think that you can
also do it
if you put a link and set the target to blank  "target=blank"
The Target Attribute

With the target attribute, you can define * where* the linked document will
be opened.

The line below will open the document in a new browser window:

<a href="http://www.w3schools.com/"
target="_blank">Visit W3Schools!</a>




------------------------------------------

POPUP:

<html>
<head>
	<title>JavaScript Popup Window How-To Example 1: Basic Popup Window</title>

<meta name="description" content="Learn to open, close and navigate
among JavaScript popup windows in the article on blazonry.com">
<meta name="author" content="Astonish Inc.">
<meta name="keywords" content="javascript, windows, popup windows,
browser window, open, close, script, frame">
<meta http-equiv="content-language" content=en>

<link rel=stylesheet type="text/css" href="/style.css">

</head>

<body bgcolor="#ffffff">

<p>

<table width="375"><tr><td>

<h2>JavaScript Popup Windows How-To</h2>

<p><font size="+1"><b>Example 1: Basic Popup Window</b></font>
	<br />
	<br />
This popup window is a completely separate HTML file that was opened
using JavaScript. This file can contain
whatever you want.</p>

<p>The JavaScript command to close a window is to refer
to the window by name, or by self-reference, and use the close method.
The link below looks like:
<pre>
    &lt;a href="javascript:self.close()"&gt;close window&lt;/a&gt;
</pre>

<p><b><a href="javascript:self.close()">Close this Window</a></b></p>

</td></tr>
</table>
</div>
</body>
-----------------------

Santa Néstor
</html>


On Dec 22, 2007 1:43 PM, David Krings <ramons at gmx.net> wrote:

> Hi!
>
> I have this hyperlink
> <a
> href="
> http://localhost:8080/file:/F:/piviviewer/include/help/en_us/Default_CSH.htm#100
> ">?</a>
> that I use to access context sensitive webhelp. The link works fine and
> the
> help shows. That is the good part, the bad part is that all my tries to
> make
> it show up in a new window so far didn't even do something. I am basically
> at
> this point:
> echo "<a
> onClick=\"javascript:window.open
> ('".$href."','HelpWindow',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');\">?</a><noscript><a
> href=\"".$href."\">?</a></noscript>";
>
> Obviously, something is majorly wrong with that. I did check the O'Reilly
> HTML&XHTML Definitie Guide to make sure that the a link has the onClick
> event.
> After getting this to work I also want to attach it to a button, which
> should
> be the same call.
>
> Anyone has a good idea on how to craft this? I'm just at the end of my
> very
> limited HTML latin.
>
> Thanks in advance!
>
> David
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20071222/e232bbee/attachment.html>


More information about the talk mailing list