Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Ajax Programming

Call a JS function from a div

Hi guys! I have a problem: When I fill a div with
document.getElementById.innerHTML the onmouseover doesn't work anymore.
I use onmouseover to call a javascript which shows a tooltip. The
javascript is located at the end of the html file. The div content is
exactly the same as at the initial load of the webpage. When I replace
the call of the tooltip-js with a simple alert() everything works fine,
even after the refreshing of the div.

Source Code is here:

Thanks in advance and greetings


this working fine (firefox and ie

         myFunc = {
                     "msg" : function()
                        alert("my string");

                     "onEvent" : function()
                        _this = myFunc;

            border: 1px solid #f00;
            height: 100px;
            width:  100px;
            border: 1px solid #0f0;
            height: 100px;
            width:  100px;

      <div id="div1">

      <br />

      <div id="div2" class="green">

      document.getElementById("div1").innerHTML = '<div class="red"
      document.getElementById("div2").onmouseover = myFunc.onEvent;

On 12/30/06, Dieter Bauster <DerDie@gmail.com> wrote:

Sem mais para o momento,
Rodrigo Souza

--------------------------------------------------------------------------- -----
:: Rodrigo Souza dos Santos
:: Curitiba - Paran - Brasil
:: rodrigosouzadossan@gmail.com
--------------------------------------------------------------------------- -----

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc