/    Sign up×
Community /Pin to ProfileBookmark

On Click & Dbl click?

I had some code that changed the size of an image when clicked and double clicked and it was working. All the sudden its not working and I have no idea why?

<script language=”JavaScript” type=”text/javascript”>
function img_size(n,w,h)
{
document[n.name].width = w;
document[n.name].height = h;
}
</script>
echo “<a onDblClick=’img_size($img_name,$JS[0],$JS[1])’ onClick=’img_size($img_name,$im_size[0],$im_size[1])’><img name=”$img_name” src=”$BASE/$photo” “.imageResize($im_size[0], $im_size[1], $TARGET).” border=”0″></a>”;

I am getting the error “Error: missing ) after argument list
Source Code:
img_size(1d19d21391cffe0ffc331f922daa26ed,518,346)”

Can anyone let me know how to fix this? Thank you.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@bike5authorJul 14.2005 — I think I finnaly figured it out. I wassn't enclosing the img name with quotes cause its not just a number......omg im happy it took me like 2 hours to figure this out...damn
×

Success!

Help @bike5 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 5.15,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...