I'm using prototype 1.5

I want to click once and update text in two <div> parts. But I find
out when I click the first time, nothing happened; when I click the
second time, both div changed. why is that?

How can I click only once, change both of these <div>s.

Thank you in advance

Yuncong

<!-- code begins -->

<script language="javascript" src="prototype.js"></script>

<div id="qwer">
change this
</div>

<div id="zxcv">
also change this
</div>

<a id="asdf" onclick="new Event.observe('asdf', 'click', function(){
        new Ajax.Updater
        (
                'qwer',
                'event1.html',
                {
                        asynchronous: true,
                        method: 'get'
                }
        );
        new Ajax.Updater
        (
        'zxcv',
                'event2.html',
            {
                        asynchronous: true,
                        method: 'get'
                }
        );
});
event.returnvalue=false;
return false; "
href="event.html">
test
</a>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to 
prototype-core-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to