PDA

View Full Version : HTML/Javascript Pop-Up Window



John
25th July 2004, 22:35
Hi people, I'm making a website, and on the navigation bar I have a set of buttons. I need to make the image (from the nav) open a small pop-up window when clicked on, that has no scrollbar, no status bar, no toolbar, nothing like that, just to open up a blank simple pop-up window basically.

Do I have to do it using Javascript?

The start of the link-code is attached below. I couldn't type it out as the forum picked it up as actual code, and not text!

Any help would be much appreciated. :)

John
26th July 2004, 00:04
Ok, after hunting the internet I've found a free pop-up javascript for opening a new window. Only when I try and insert it into the code in dreamweaver, it treats it as text, so I'm pretty sure that I have inserted it into the wrong place.

Where it says "Text For Link Here", that is the text that is displayed for the link. But as I'm linking from an image, and not a word, I need to remove that part somehow.

Again, very grateful if anyone can help me!

TheOldhamWhisper
26th July 2004, 07:17
Where the text is, you need to use the code to display the graphic.

As it is almost impossible to display the code, it's the bit that starts with IMG in appears instead of the text for the link.

TheOldhamWhisper
26th July 2004, 07:28
<a href="http://siteurl" target="_blank"><IMG alt="Please Rate this site!"
src="http://pictureurl" border=0></a>


Oh look - you use the wrap html tags!

John
26th July 2004, 11:19
Thanks O, but sorry to be a pain, but it still won't work wherever I put the code. I've tried numerous options and it isn't working. The whole line is:



<a href="profile.html" target="_blank" onClick="MM_nbGroup('down','group1','profile','nav/pro01rl.jpg',1)" onMouseOver="MM_nbGroup('over','profile','nav/pro01rl.jpg','nav/pro01rl.jpg',1);MM_nbGroup('over','profile','nav/pro01rl.jpg','nav/pro01rl.jpg','home01eye','nav/pro01eye.jpg','nav/pro01eye.jpg',1);MM_nbGroup('over','profile','nav/pro01rl.jpg','nav/pro01rl.jpg','rightplc','nav/pro02right.gif','nav/pro02right.gif',1)" onMouseOut="MM_nbGroup('out')"><img src="nav/pro01st.jpg" alt="profile" name="profile" width="97" height="39" border="0" onload=""></a>

I didn't want to have to paste the whole line as it looks confusing with the rollovers in there, but I hope you can help me out as to where I put the code. The "a href" part and the "img src" part are in two different places.

vegyjones
26th July 2004, 11:35
I don't know you are all useless! :rolleyes:

popwin = window.open("", "popup", "width=550,height=200,screenX=22,left=22,screenY=22,top=22")

That's the code for a pop up window, just alter the sizes.
Found it on this site

http://hjem.get2net.dk/petermad/scripts/popup-uk.htm

Hope that helps Stereo!
But on reflection, doesn't look like anything you were talking about!

Sorry Johnny :dunce

John
26th July 2004, 11:59
There are many ways to implement a pop up window, and that's another way, only still I've tried it and it doesn't seem to work! The code is fine, so it must be something I'm doing wrong.

Thanks though Vegy, it looks simpler than my code nicked from another source!

vegyjones
26th July 2004, 13:39
what base are you using to start up your website Stereo, and how much does it all cost??

I might start up a site for my Vegy vegy fan club!

John
26th July 2004, 15:16
Who's the daddy? I've cracked it. :D

It isn't a website for myself Vegy, I'm designing it for someone else, but when it's finished you're welcome to take a peep.

:spam :spam :spam I hear you all cry!