help with javascript behaviours?

P

pantagruel

Hi,
I've got an application I'm working with that is using Ben Nolan's
behaviors library.

The following code is not working:

'span.datareference' : function (element){
element.onclick = function(){ alert("why not workee?");}
},


evidently the reason is that the parts of the document I want to
associate a behavior with are dynamically written from the response to
a Ajax Post from Prototype's library. I say evidently because the code
is not raising any errors in the error console, I put it at the
beginning of my rules definition and all the other rules are working,
and when I save the page to the filesystem and open it in the browser
it works.

Any suggestions?

Cheers,
Bryan Rasmussen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,426
Latest member
MrMet

Latest Threads

Top