Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old October 22nd, 2004, 01:39 AM
Authorized User
 
Join Date: Sep 2004
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have try doing something like :
Code:
img.onclick = deleteItem("Delete");
so that, the function "deleteItem" will receive a parameter. But I get a javascript error message : obect require. So, is ut means that we cannot pass in any parameter(s) to the function "deleteItem".

Thanks a lot, guys.

Reply With Quote
  #12 (permalink)  
Old October 22nd, 2004, 02:23 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello muklee,

You could use
Code:
img.onclick = function(){deleteItem("Delete");};
or
Code:
img.onclick = new Function("deleteItem('Delete');");
HTH,

Chris

Reply With Quote
  #13 (permalink)  
Old October 22nd, 2004, 02:35 AM
Authorized User
 
Join Date: Sep 2004
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Excellent, finally the page is working well.
Thank you so much to all you, thanks.

Reply With Quote
  #14 (permalink)  
Old June 4th, 2008, 03:46 AM
Registered User
 
Join Date: Jun 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to pecal
Default

hello muklee
i meet the same problem,i try as ChrisScott said,i use the method

img.onclick = function(){deleteItem("Delete");};
and
img.onclick = new Function("deleteItem('Delete');");
but it does not work
My code:
function parseSubTree(id){
var el= document.getElementById(id);
var images = el.getElementsByTagName("IMG");
images[0].onClick=function(){showHide(id);};
}
i can't solve it ,hope to get some hlep from you


Reply With Quote
  #15 (permalink)  
Old June 4th, 2008, 04:08 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi All !!
There is solution and observations on this..
http://p2p.wrox.com/topic.asp?TOPIC_ID=71868

Cheers :)

vinod
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate onclick event collie Javascript 4 May 27th, 2008 09:22 AM
onclick event bjackman Access 6 July 15th, 2004 06:54 AM
onclick event pigtail Javascript 1 April 11th, 2004 03:10 PM
onClick Event mateenmohd Javascript 4 December 16th, 2003 01:08 AM
onclick event not working? mumps Javascript 2 September 15th, 2003 10:09 AM



All times are GMT -4. The time now is 09:05 AM.


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