Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop up Window including HTML code

Status
Not open for further replies.

jazzme

Programmer
Nov 28, 2003
8
0
0
IN
Somebody help me how to code the pop up window.
And pls give me the html code after you write the
Java script code.
 
Hi,

Sorry mate I went home hence the lack of reply.

Ok here is your html code.
<html>
<head>
</head>
<body>
<A HREF=&quot;javascript:void(0)&quot;
ONCLICK=&quot;open('sample.htm','miniwin','toolbar=1,location=1,directories=1,status=1,menubar=1, scrollbars=1,resizable=1,width=300,height=300')&quot;>Open a Window</A>
</body>
</html>

You do not specify what HTML code you mean, but I will try to explain.

The <a href> tag is the normal HTML tag, it holds within it the javascipt you need. You then close it by the > tag. You then write whatever you want to link, e.g PRESS HERE TO OPEN A WINDOW, then after that text, put the HTML code </a>

I hope this helps you, if not, please say and I will in the morning when I get into work help you out again

Cheers

James
 
Thanks!Sorry if I am dont specify my problem.
I will try to explain it.
Here's the problem.
I have link to my page.What I want to do is when I click
the link it will open another window.Like the small window.
I know how to create links in HTML. But I am not sure that theres additional code that I need to write in my HTML code when I do the popup window in JS.But anyway I will try your code.

Thankz A Lot,

Jazz
 
Do you want to open a site or HTML page from a link inside the pop-up window??
If yes, then the link has to have the target as &quot;_blank&quot; because otherwise the link will open the page inside the pop-up (without the toolbars and such)...

EX:
Code:
<a href=&quot;somepage.html&quot; target=&quot;_blank&quot;> Open Page </a>
I have not failed; I merely found 100,000 different ways of not succeding...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top