toolbar-less popup help

  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

Hello,

I'm trying to find a javascript that will popup a new page without all the tools (just the scroll bar) when I click on an image.

I can get it to work with links but not images.

Does anyone know of a javascript that will allow me to do this?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • fional24
  • Graduate
  • Graduate
  • fional24
  • Posts: 125
  • Loc: Scotland

Post 3+ Months Ago

Hi,

This is javascript produced by Dreamweaver, but you can customise it to suit your required size etc..

Code: [ Select ]
<html>
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
 window.open(theURL,winName,features);
}
//-->
</script>

<body onLoad="MM_openBrWindow('http://www.ozzu.com','PopUp','width=400,height=400')">
click here
</body>
</html>
  1. <html>
  2. <script language="JavaScript">
  3. <!--
  4. function MM_openBrWindow(theURL,winName,features) { //v2.0
  5.  window.open(theURL,winName,features);
  6. }
  7. //-->
  8. </script>
  9. <body onLoad="MM_openBrWindow('http://www.ozzu.com','PopUp','width=400,height=400')">
  10. click here
  11. </body>
  12. </html>


If you paste this into notepad and preview in IE, it will give you a window with ozzu.com in a pop up.
  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

Maybe something like this:

Code: [ Select ]
<html>
<head>

<script type="text/javascript">
function openwindow()
{
window.open("http://www.w3schools.com","","toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=400")
}
</script>

</head>
<body>
<img src="logo.gif" onclick="openwindow()">
</body>
</html>
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function openwindow()
  5. {
  6. window.open("http://www.w3schools.com","","toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=400")
  7. }
  8. </script>
  9. </head>
  10. <body>
  11. <img src="logo.gif" onclick="openwindow()">
  12. </body>
  13. </html>


If you have it working with links I think you could also just wrap a pop open link around the image tag and set border="0" inside the image tag.
  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

fional24 wrote:
Hi,

This is javascript produced by Dreamweaver, but you can customise it to suit your required size etc..

Code: [ Select ]
<html>
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
 window.open(theURL,winName,features);
}
//-->
</script>

<body onLoad="MM_openBrWindow('http://www.ozzu.com','PopUp','width=400,height=400')">
click here
</body>
</html>
  1. <html>
  2. <script language="JavaScript">
  3. <!--
  4. function MM_openBrWindow(theURL,winName,features) { //v2.0
  5.  window.open(theURL,winName,features);
  6. }
  7. //-->
  8. </script>
  9. <body onLoad="MM_openBrWindow('http://www.ozzu.com','PopUp','width=400,height=400')">
  10. click here
  11. </body>
  12. </html>


If you paste this into notepad and preview in IE, it will give you a window with ozzu.com in a pop up.


This just opens a popup when the page is opened correct?

I need it so that when I click an image a new page will popup w/o the toolbars.
  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

RichB wrote:
Maybe something like this:

Code: [ Select ]
<html>
<head>

<script type="text/javascript">
function openwindow()
{
window.open("http://www.w3schools.com","","toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=400")
}
</script>

</head>
<body>
<img src="logo.gif" onclick="openwindow()">
</body>
</html>
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function openwindow()
  5. {
  6. window.open("http://www.w3schools.com","","toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=400")
  7. }
  8. </script>
  9. </head>
  10. <body>
  11. <img src="logo.gif" onclick="openwindow()">
  12. </body>
  13. </html>


If you have it working with links I think you could also just wrap a pop open link around the image tag and set border="0" inside the image tag.



thanks!
  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

homer simpson wrote:
fional24 wrote:
Hi,

This is javascript produced by Dreamweaver, but you can customise it to suit your required size etc..

Code: [ Select ]
<html>
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
 window.open(theURL,winName,features);
}
//-->
</script>

<body onLoad="MM_openBrWindow('http://www.ozzu.com','PopUp','width=400,height=400')">
click here
</body>
</html>
  1. <html>
  2. <script language="JavaScript">
  3. <!--
  4. function MM_openBrWindow(theURL,winName,features) { //v2.0
  5.  window.open(theURL,winName,features);
  6. }
  7. //-->
  8. </script>
  9. <body onLoad="MM_openBrWindow('http://www.ozzu.com','PopUp','width=400,height=400')">
  10. click here
  11. </body>
  12. </html>


If you paste this into notepad and preview in IE, it will give you a window with ozzu.com in a pop up.


This just opens a popup when the page is opened correct?

I need it so that when I click an image a new page will popup w/o the toolbars.


Actually, this works if I have one image, but I actually need it to work for several different images on the same page. Any idea what I can do for that?
  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

nevermind, figured it out :)
  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

me and my replies...

I just made a new javascript for each image but on some pages I'll need aroudn 20 and that seems like a PITA. Can I do something different rather than adding the following to each image?

<script type="text/javascript">
function openwindow()
{
window.open("http://www.w3schools.com","","toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=400")
}
</script>



I have this setup for my text links:

<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=550,height=420,scrollbars=yes');
return false;
}
//-->
</SCRIPT>


and for each link:

<a href="page.htm" onClick="return popup(this, 'notes')"><font size="1">Model</font></a>
  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

Stop reading! I got it to work. Trial and error.
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

:lol: @ u :wink: :D
  • fional24
  • Graduate
  • Graduate
  • fional24
  • Posts: 125
  • Loc: Scotland

Post 3+ Months Ago

Doh!

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 82 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.