Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-09-10
7
Medium Priority
?
174 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 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
New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

 
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

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

Question has a verified solution.

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

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
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 …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

730 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