|
-
Jul 25th, 2005, 12:43 AM
#1
Thread Starter
New Member
how to open pop-up window
hi everybody,
i wan't to open a pop-up window from existing page with a link given in anchor tag. The link is like this example: www.google.com. If i'am clicking the link a new pop-up window with www.google.com must open. i'am using javascript for this. please help me in this issue.
thanx
kishore
-
Jul 25th, 2005, 01:01 AM
#2
Fanatic Member
Re: how to open pop-up window
First off, this post should be in XML, HTML, Javascript, Web and CGI.
Second, I'll try to answer. You can use the target attribute in html having something like <a href="http://google.com" target="google">google</a>. If you really want to use javascript, open function in a window object covers, i guess. <a href="" onclick="window.open('http://google.com');">google</a>
-
Jul 25th, 2005, 01:03 PM
#3
Re: how to open pop-up window
 Originally Posted by nebulom
Moved
-
Aug 5th, 2005, 02:34 PM
#4
Hyperactive Member
Re: how to open pop-up window
If you want to use JavaScript outside of the HTML tags, you can make the JavaScript code block in the HEAD section of your HTML code and do this:
Code:
<script language="javascript">
function pop_up()
{
window.open("http://www.google.com", "", attributes);
}
</script>
You can then do this in the HTML code:
Code:
<a href="" onclick="javascript:pop_up()">www.google.com</a>
Here are some attributes that you an use for the window.open() method:
width - width of the pop-up window
height - height of the pop-up window
location - Shows the address bar in the pop-up window (set to true or false)
menubar - Shows the menu bar in the pop-up window (set to true or false)
resizeable - Enables or disables manual resizing of the pop-up window (set to true or false)
scrollbars - Enables or disables the scrollbars (set to true or false)
status - Enables or disables the status bar (set to true or false)
titlebar - Enables or disables the titlebar (set to true or false)
toolbar - Enables or disables the toolbar (set to true or false)
This seems like a lot but it gives you full control over how the pop-up window appears.
Last edited by GamerMax5; Aug 5th, 2005 at 02:39 PM.
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
|