/    Sign up×
Community /Pin to ProfileBookmark

open window issue

Hi there, I want to open a new window on click of my javascript gallery images. Have been trying lots of variations but dont really know what Im doing and need to get this sent to someone today. I know I really need to learn JS properly, can anyone could help me get out of a pickel, and I promise to get studying?

this is the JS funtion that makes my gallery work……..

[CODE]domReady(function()
{
var instanceOne = new ImageFlow();
instanceOne.init({ ImageFlowID:’slider’ });

});[/CODE]

Im ment to add the below to it for opening a fresh window……

[CODE]
var target_2 = new ImageFlow();
target_2.init({ ImageFlowID: ‘target_2’,
onClick: function() {window.open(this.url, ‘_blank’,
‘width=500,height=500,left=200,top=200’);} });
[/CODE]

do I just sit this below the first bit of JS?

Now the problem Im having, is how to reference the second funtion in my html.I have been trying to ref target_2 in the html for each image to no avil,

could anyone tell me how to add it? heres the html for one of the images

[code=html] <div id=”slider” class=”imageflow”>
img src=”img/magda.jpg” longdesc=”http://www.magda-stawarska-beavan.com/inheritance.php” width=”200″ height=”148″ alt=”Sound and Video Artist” /> [/code]

many thanks
jax?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@jax42authorJul 25.2010 — I still havent managed to resolve this, nearly 200 people have looked and no one written anything, have I done something wrong? is it not clear? or tricky?

any advice? thanks
×

Success!

Help @jax42 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.17,
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,
)...