Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Mar 23rd, 2006, 10:25 AM   #21
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
This is your function:
function enlarge (wURL, sp)
{
	var curImage = wURL.split ('/');
	var target = "img/popup/" + curImage;
	var specs = "width=400,height=400,top=50,left=50," +
	  			"screenx=50,screeny=50," +
			  	"resizable=yes,scrollbars=yes";
	if (sp) specs = sp;
	popWin = open ( target="POPpagePOPTEMP6.html", "popWindow", specs);
	popWin.focus ();
	return popWin;
}
Exactly how do you think the popup knows what image to display? You get the image name in 'target', then reassign 'target' in the call to open, thus destroying the image name. If you're not going to copy MY function, but use YOUR function, then pass the popup window name with a GET addition specifying the image.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Mar 23rd, 2006, 3:24 PM   #22
Ficus
Newbie
 
Join Date: Jan 2006
Posts: 12
Rep Power: 0 Ficus is on a distinguished road
Oops, didn't catch that. I assumed that target was specifically for defining a location. I'd like to use your function, but it is critical that I use the popup window template that I created as opposed to opening in just a blank window.
Quote:
... but use YOUR function, then pass the popup window name with a GET addition specifying the image.
Over my head, sorry.

Quote:
Exactly how do you think the popup knows what image to display?
I see what you mean about the target. I game that a new name. I'm unsure what I need in the popup window itself. Currently, it is some old code from a different script and I'm not sure how to modify it. I'll keep working at it. Thanks for spending all the time with this, you've done more than your share and I appreciate it.
Ficus is offline   Reply With Quote
Old Mar 23rd, 2006, 3:43 PM   #23
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
popWin = open ( "POPpagePOPTEMP6.php?image=" + target, "popWindow", specs);
Note that, as usual, I show for PHP.
Then, in "POPpagePOPTEMP6.php"
<?php
...
if ($_GET ['image']) $image = $_GET ['image'];
...
?>
<html>
...
<img src="<?php echo $image;?>"/>
...
</html>
or whatever all you want in the image tag.

You have a lot of studying to do and things to catch up on if you're going to produce these things professionally.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Mar 27th, 2006, 2:38 PM   #24
Ficus
Newbie
 
Join Date: Jan 2006
Posts: 12
Rep Power: 0 Ficus is on a distinguished road
Thanks for all your help. I realize I have a lot to learn and knew that would be the case when I got this project. I don't plan to do this professionally, but I do hope to gain a better understanding of the languages. Thanks again!
Ficus 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 3:32 PM.

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