You needed to search further:

(searched Google with "createEvent javascript")

http://www.itworld.com/nl/javascript/05072002/

But you may find it will only work with IE.

Regards,
Gary



On Fri, 24 Dec 2004 22:20:51 -0500, berry <[EMAIL PROTECTED]> wrote:
> I understand that the list is dedicated to CSS but as Standard Group I
> presume someone can answer my DOM question.
> 
> I search evrywhere on the web, I read books, I make many test using the w3c
> specification and the fireFox information but It seems that it is
> impossible to be done.
> As I know that people on this list are usually very uptodate with standard
> and w3c specification maybe someone has the answer
> 
> I am trying to create an Event to add it to a html tag.  I thought that the
> answer was createEvent("MouseEvents") but it was not the case. createEvent
> doesn't work the same way as a createElement.  It simulate an event but
> don't write the event.
> 
> What I am looking for is a function wich has the ability to write the event
> as such:
> el=CreateEvent ("mousedown")
> el.eventFunction="abc(z,y,x)"
> HTMLelement("mydiv").append(el)
> 
> and the result must be as such  <div id="mydiv" onmousedown="abc(x,y,z)">
> </div>
> 
> addEventListener doesn't help me because we can not add the function
> (this) and if we made a save of the complete page we see that the event was
> not written. In the case of createElement the object would have been
> written in the page.  The other problem with addEventListener, it executes
> once we call it.
> 
> I know that for the Java DOM  there is object.setEvent("onclick", "abc(this") 
> )
> 
> would someone have an Idea
> 
> Thanks in advance
> 
> happy hollidays
> 
> Berry
> 
> ******************************************************
> The discussion list for  http://webstandardsgroup.org/
> 
> See http://webstandardsgroup.org/mail/guidelines.cfm
> for some hints on posting to the list & getting help
> ******************************************************
> 
>
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to