Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 21st, 2004, 11:30 AM   #1
Xko
Newbie
 
Join Date: Sep 2004
Posts: 18
Rep Power: 0 Xko is on a distinguished road
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.
Xko is offline   Reply With Quote
Old Sep 21st, 2004, 11:52 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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;"
As you can probably see, this opens the window you place in the brackets. The "return false" bit tells the link not to go wherever it was going - you still put the href bit in for people who don't use JavaScript.

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.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 21st, 2004, 12:09 PM   #3
Xko
Newbie
 
Join Date: Sep 2004
Posts: 18
Rep Power: 0 Xko is on a distinguished road
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>

?
Xko is offline   Reply With Quote
Old Sep 21st, 2004, 12:11 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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>
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 21st, 2004, 12:18 PM   #5
Xko
Newbie
 
Join Date: Sep 2004
Posts: 18
Rep Power: 0 Xko is on a distinguished road
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?
Xko is offline   Reply With Quote
Old Sep 21st, 2004, 1:12 PM   #6
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,629
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
did you try the first one. the one that is longer? if not give that a try as that should work
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is online now   Reply With Quote
Old Sep 21st, 2004, 1:25 PM   #7
Xko
Newbie
 
Join Date: Sep 2004
Posts: 18
Rep Power: 0 Xko is on a distinguished road
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!?!
Xko is offline   Reply With Quote
Old Sep 21st, 2004, 9:43 PM   #8
sarumont
Hobbyist Programmer
 
sarumont's Avatar
 
Join Date: Apr 2004
Location: /dev/urandom
Posts: 154
Rep Power: 5 sarumont is on a distinguished road
Send a message via ICQ to sarumont Send a message via AIM to sarumont Send a message via Yahoo to sarumont
Ooble jipped you on quotes. You need to add a double-quote (") to the left of the > before the 1.

;">1</a>
__________________
"Time is an illusion. Lunchtime doubly so."
-the late, great Douglas Adams
sarumont is offline   Reply With Quote
Old Sep 22nd, 2004, 8:05 AM   #9
Xko
Newbie
 
Join Date: Sep 2004
Posts: 18
Rep Power: 0 Xko is on a distinguished road
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!
Xko is offline   Reply With Quote
Old Sep 22nd, 2004, 8:38 AM   #10
Xko
Newbie
 
Join Date: Sep 2004
Posts: 18
Rep Power: 0 Xko is on a distinguished road
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...

Open the Popup Window

All i need to do now is change a bit of the wording around.

Thanks all!
Xko is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:51 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC