/    Sign up×
Community /Pin to ProfileBookmark

launching a new window

Obviusly I am a novice at JavaScript and I know that one of you knowledgeable JSers will be able to give me a tip without so much as a thought.

I am doing a photo gallery and I would like to launch a window from my parent page with an enlarged picture in it. Incredibly simple, right?

Here’s my code… I know that I must be doing something wrong. If anyone could point out what, I’d be very grateful.

Thanks,
Elizabeth

This is the code for my img and anchor tag:

[CODE]<a href=”#” onclick=”openWin();” title=”Pictures of Boxer Puppies”><img align=”left” style=”” src=”images/foto-file2.gif”></a>[/CODE]

I am referencing my script from my photo gallery page with this code:

[CODE]<script language=”JavaScript” src=”http://www.boxerbonanza.com/bbgeneral.js”>
</script>[/CODE]

And, lastly, this is my function:

[CODE]function openWin() {

puppyWindow = window.open(“http://www.boxerbonanza.com/boxer-puppy-photo-gallery.php”,”Puppy Window”,”width=400,height=500″);

}[/CODE]

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@luminary4himauthorMar 18.2006 — I forgot to say also that it works fine if I exclude all arguments in the window.open method except the url... but when I include title, width, height, etc... it refuses to work.
Copy linkTweet thisAlerts:
@luminary4himauthorMar 24.2006 — Please? Does [I]any[/I]one have any advice? At all?
Copy linkTweet thisAlerts:
@TheBearMayMar 24.2006 — FF doesn't have a problem with it, but IE doesn't like the space in the second argument. Change it to something like:
<i>
</i>puppyWindow = window.open("http://www.boxerbonanza.com/boxer-puppy-photo-gallery.php","PuppyWindow","width=400,height=500");
Copy linkTweet thisAlerts:
@luminary4himauthorMar 24.2006 — *sigh*

I can't believe they're that picky... but that [I]was[/I] what was wrong.

*does an I'm-happy-to-finally-move-on-to-more-important-things jig*

Thanks so much! ?
Copy linkTweet thisAlerts:
@TheBearMayMar 24.2006 — Glad to hear it.
×

Success!

Help @luminary4him spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...