how to add pop up link in my site...

torrfriend

New Member
in my site i added a lot of sites list.....eg: google , yahoo , orkut, facebook,.....

what i need ? when the user click google, then google website will open as pop up....how to create ...any scripts...

because i searched in net but all are posting about link of same domain or same domain web page
 

denno020

New Member
inside the link tag just add target="_blank". That will open links in a new window.

eg:
Code:
<a href="http://www.google.com" target="_blank">Google!</a>

Denno
 

LouTheDesigner

New Member
The code ^^ above mine will probably open the page in a new tab, not a new window:

just use this:

<A HREF="javascript:void(0)"
onclick="window.open('http://www.google.com,'Google')">
Google</A>
 

ishie

New Member
To create a popup you'll need the following script:

<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}

// -->
</script>

Then, you link to it by:

<a href="popupex.html" onclick="return popitup('popupex.html')"
>Link to popup</a>
 

alenjolly

New Member
Hello All,

I just joined this forum and going through this post, actually I was looking for this only, How to create pop-up...

I have also few doubts, that I will post in new thread..


--
Regards,
Alen
 

PixelPusher

Super Moderator
Staff member
Are you looking for a window with defined/custom attributes (width, height, scrollbars, status bar, resizeable, etc.) or do you just want a new window to open?

If you want the custom window, you will need to use javascript like Lou and ishie posted, but if you just want a new window use the _blank in the anchors target like denno stated.
 
I tried my best but this short time have able to get this form of code if it can help you this will be my success.
<html>
<head>
<script type="text/javascript">
function accesskey()
{
document.getElementById('w3').accessKey="w";
document.getElementById('w3dom').accessKey="d";
}
</script>
</head>

<body onload="accesskey()">

<p><a id="w3" href="http://www.w3schools.com/">W3Schools.com</a> (Use Alt + w to give focus to the link)</p>
<p><a id="w3dom" href="http://www.w3schools.com/htmldom/">HTML DOM</a> (Use Alt + d to give focus to the link)</p>

</body>
</html>
 

orangecopper

New Member
To create a popup you'll need the following script:

<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}

// -->
</script>

Then, you link to it by:

<a href="popupex.html" onclick="return popitup('popupex.html')"
>Link to popup</a>


This should be cool !
Cheers
Joshu
 
Top