Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-09-10
7
Medium Priority
?
179 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 10

Accepted Solution

by:
rockmansattic earned 200 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
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

 
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

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 …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

782 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