Solved

Making a pop up window appear when a link is clicked...

Posted on 2004-09-10
7
171 Views
Last Modified: 2010-04-25
Hi, im using Dreamweaver MX and im needing a specific sized window to appear when a link is clicked on on the main site page...

i need the window to be 400X600 in size and preferably be centered...

hope someone can help1

cheers
0
Comment
Question by:mhaysom123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 10

Accepted Solution

by:
rockmansattic earned 50 total points
ID: 12027547
0
 
LVL 7

Expert Comment

by:jay_eire
ID: 12027783
In the
design tab,
click on behaviors...
then click on Open Browser Window....
just fill in the options in this box and it will put the code into your dreamweaver page.
0
 
LVL 7

Expert Comment

by:jay_eire
ID: 12027818

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>

<body>
 <a href="#" onClick="MM_openBrWindow('test2.html','mypopupwindow','width=400,height=600')">my link
 </a>
</body>
</html>

0
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 
LVL 10

Expert Comment

by:rockmansattic
ID: 12027858

This will not be centered, nor will he be able to control the atributes.


<quote>
i need the window to be 400X600 in size and preferably be centered...
</quote>


Rockman
0
 

Author Comment

by:mhaysom123
ID: 12029058
hi i tried to have a go with the link you entered rockmansattic but i had little luck, probably my fault as im not too good with java. I had a look in the dreamweaver help section and it says

''Use the Open Browser Window action to open a URL in a new window. You can specify the properties of the new window, including its size, attributes (whether it is resizable, has a menu bar, and so on), and name. For example, you can use this behavior to open a larger image in a separate window when the visitor clicks a thumbnail image; with this behavior, you can make the new window the exact size of the image''

this seems to be what i need as im not too fussed if it isnt centered, but the only thing is, i need the window to open up on a text link, but i can only use this behaviour on images etc...?

is there a way of making the behaviours work on text?

if not i will have to make images of all my text, which would be a lot, and that would then take alot of time etc..

hope someone can shed some light

cheers

mat
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 12029348

Yes, you can use an onclick command for text

But the link I sent you should work best,

Just follow the directions in the script....copy and paste the head content then copy the link.

Let me know i fyou have any other problems.

Here is the overall page using the like I suggested

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//  End -->
</script>
</head>

<body alink="#CC3333">
<a href="http://www.yahoo.com/" onclick="NewWindow(this.href,'name','400','600','yes');return false;">Popup Yahoo.com</a>
</body>
</html>

Rockman



0
 

Author Comment

by:mhaysom123
ID: 12029685
ah yes, i see now.

thanks, i think i was copying too much last time..

:)

cheers again

mat
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Getting the co-ordinates of a map 1 206
removing xml elements and children 5 554
change form target with jquery 2 444
Multiple HTML5 Videos – One player – Dreamweaver CS6 10 364
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question