|
-
May 1st, 2002, 09:31 AM
#1
Thread Starter
New Member
little question
How do I make a pop-up window (using html)?
Thanks!
-
May 1st, 2002, 10:08 AM
#2
Fanatic Member
You use a client side language such as javascript.
Code:
<script language="javascript" type="text/javascript">
function openWin(){
window.open('new','page.htm');
}
</script>
-
May 1st, 2002, 10:17 AM
#3
Thread Starter
New Member
thanks for your reply
How do I do that in this kind of a tag:
<AREA SHAPE=RECT COORDS="154,489,190,550" HREF="otherpage.html" TARGET="_blank" ALT="BRN 70" OnMouseOut="window.status=''; return true" OnMouseOver="window.status='BRN 70'; return true">
(i.e. instead of using href)
-
May 1st, 2002, 10:34 AM
#4
Thread Starter
New Member
never mind, solved that one.. 
but can anyone help me with this other problem? 
how do i pass a variable from this tag (the one in my reply) to the pop-up window?
thanks!
-
May 1st, 2002, 10:51 AM
#5
Frenzied Member
JavaScript passes variables the same way most modern languages do. JavaScript's syntax is based on Java, which in turn is based on C/C++, which in turn.... Perl, JScript, VB, Fortran, and a host of other languages pass variables in the same way.
Code:
<html>
<head>
<title>Test Page</title>
<script type="text/javascript">
function myFunction (myVar) {
alert(myVar);
}
</script>
</head>
<body>
<p onclick="javascript:myFunction('Foo');">Click Me!</p>
</body>
</html>
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
May 1st, 2002, 11:21 AM
#6
Fanatic Member
You write to a document using document.write
Code:
<script language="javascript" type="text/javascript">
function openWin(){
newwin=window.open('new','page.htm');
newwin.document.write('Something');
}
</script>
-
May 1st, 2002, 02:18 PM
#7
Thread Starter
New Member
no no,.. that's not what i meant.. i know how to pass it to a function on the same page, and i don't want to write it to another page, i need to pass it to the pop-up window (which is a separate page).. how do i do that?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|