Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 23rd, 2010, 07:44 AM
Registered User
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default changing the onclick property trough javascript

Hi everyone,

I need to change

onclick="javascript:getNextPhoto('x','y');

to

onclick="javascript:getNextPhoto('z','w');

var next="'" + polje[0] + "','" + polje[3] + "'";
$("#next").attr('onclick', next);

doesnt work

niether does

document.getElementById( "#next" ).onclick = new Function("getNextPhoto(" + next + ");");

please help, thx!





Similar Threads
Thread Thread Starter Forum Replies Last Post
changing property doesn't work Vanni VB.NET 4 July 1st, 2005 07:50 AM
Problem when changing the Location property armandoa Crystal Reports 0 October 8th, 2004 06:21 PM
changing the onclick property dynamically? nerssi Javascript 8 September 21st, 2004 12:59 AM
Setting Checkbox Checked Property from OnClick saturdave ASP.NET 1.0 and 1.1 Basics 2 April 8th, 2004 09:33 AM
Changing Control Property from another Frame Wandha ASP.NET 1.0 and 1.1 Basics 4 August 8th, 2003 01:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.