[jQuery] Re: Why do i keep getting: test is not defined!

2008-06-20 Thread Mark
will take a look at that unobtrusive javascript but any suggestions for good docs about that? -- Josh - Original Message - From: Mark [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Thursday, June 19, 2008 4:13 PM Subject: [jQuery] Re: Why do i keep getting: test is not defined

[jQuery] Re: Why do i keep getting: test is not defined!

2008-06-20 Thread Liam Byrne
How are you calling removeItem ? It needs two parameters - the name and the object reference. Liam Mark wrote: hey, function removeItem(name, obj) { var answer = confirm(Are you sure you want to delete: + name + ?) var test = obj; if (answer) {

[jQuery] Re: Why do i keep getting: test is not defined!

2008-06-20 Thread Mark
and i'm giving those 2! Here is the full stuff again (posted in my last and first post as well) Javascript: function removeItem(name, obj) { var answer = confirm(Are you sure you want to delete: + name + ?) var test = obj; if (answer) {

[jQuery] Re: Why do i keep getting: test is not defined!

2008-06-19 Thread Josh Nathanson
Your function is fine, however when you *call* the function removeItem, you'll need to pass in two arguments -- otherwise obj will be undefined: removeItem('myitem'); // obj is undefined removeItem('myitem', myobject); // obj is defined -- Josh - Original Message - From: Mark

[jQuery] Re: Why do i keep getting: test is not defined!

2008-06-19 Thread Mark
Thanx for the fast reply! I just now found why it was not working.. With this it works: a onclick=removeItem('something', this.parentNode);click/a with this not (will give the freaking error): a href=javascript:removeItem('something', this.parentNode);click/a Now why is this not working with a

[jQuery] Re: Why do i keep getting: test is not defined!

2008-06-19 Thread Josh Nathanson
separated. -- Josh - Original Message - From: Mark [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Thursday, June 19, 2008 4:13 PM Subject: [jQuery] Re: Why do i keep getting: test is not defined! Thanx for the fast reply! I just now found why it was not working