Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Problem w/Javascript, interpolation, functions, onclick
- From: mwarden at gmail.com (Matt Warden)
- Subject: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Date: Tue Oct 24 22:53:04 2006
On 10/24/06, Nathan V. Patwardhan <nvp@xxxxxxxxx> wrote:
> var actions = new Array (
> ['Cancel', 'edit_release(this, "cancel")'],
> ['Submit', 'submit_release(this)']
> );
I could get your eval to work for you, but then I'd have to take 30
showers. And I still wouldn't feel clean.
Try your array like this instead:
var actions = new Array (
['Cancel', function() {edit_release(this, "cancel")}],
['Submit', function() {submit_release(this)}]
);
Now, lord knows what you're trying to do with passing 'this'. If you
tell us what you want 'this' to refer to, we can probably help you out
there. Whatever you're wanting it to point to, it ain't.
--
Matt Warden
Cleveland, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.
- Follow-Ups:
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- From: Nathan V. Patwardhan
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- References:
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- From: Nathan V. Patwardhan
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Prev by Date: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Next by Date: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Previous by thread: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Next by thread: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Index(es):