![]() |
not sure which language you'd use for this so i posted here...
basically what i want to create is a small pop-up window so that when a user clicks on a link to a game screenshot they get a small pop-up of it instead of being taken to another page. I think it might be java-ish but again i'm not too sure. |
Not Java, JavaScript. They're totally different - the only thing in common is the name. In the <a> tag, simply put:
:
onClick="javascript:window.open('<url>'); return false;"An alternative (and probably a better idea) is to put this into a bog-standard link: :
target="_blank"With the JavaScript, you can change the width and the height of the window, but someone else is gonna have to help you with that. |
Right ok, so if i had this link...
1 should then now read... <a onClick="javascript:window.open('<http://www.classic-games.org/screenshots/alienbreed01.gif>'); return false;"</a> ? |
Not quite. It should be either:
:
<a href="http://www.classic-games.org/screenshots/alienbreed01.gif" onClick="javascript:window.open('http://www.classic-games.org/screenshots/alienbreed01.gif'); return false;>1</a>Or: :
<a href="http://www.classic-games.org/screenshots/alienbreed01.gif" target="_blank">1</a> |
Ok i've used the latter of your two quotes (as it's shorter!) but yet when i upload it, then click the link it takes me to a new page, not create a popup on the same page.
hmmm? |
did you try the first one. the one that is longer? if not give that a try as that should work :)
|
i did, but i think there must be one or more characters/symbols missing as it's not just the '1' that is the link, it's everything afterwards and i'm not too sure what i need to insert or where.
must be a confidence thing!?! |
Ooble jipped you on quotes. ;) You need to add a double-quote (") to the left of the > before the 1.
:
;">1</a> |
That's the one...i knew something was missing, what & where though i wasn't too sure.
Thanks sarumont! Another question though if you gents would be so kind... Here's the page i want the popup window to 'popup' on...here now when i click the '1' for the first screen shot it still goes to a seperate page. My question is, is the popup actually working but it's just that the size of the popup window is 'full size' and that i need to resize the window? Sorry for all the questions! - but you're a great help! :D |
Sorted!
I have just found this site here that actually takes the information you input and creates the code afterwards and bam! it works! Here was the final coding anyway...:D Open the Popup Window All i need to do now is change a bit of the wording around. Thanks all! |
| All times are GMT -5. The time now is 10:55 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC