This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sx tags's listenTopics gets called many many times!

 
Yar lag
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a simple situation where inside a div, it has the following items:

<div>
<sx:autocompleter valueNotifyTopics="change" />
<sx:submit targets="windowframe" listenTopics="change" indicator="loader" cssStyle="display:none" />
</div>

The idea, is that when you select something in the autocompleter, it submits the form to somewhere.


Now everything works, it does submit. But the problem is, this div is loaded using <sx:div>'s ajax. That means this div can be loaded into the current document multiple times. And I find each time this div is loaded, the listenTopics get added once. So if I fire the ajax div 5 times, the form will be submitted 5 times when I choose something in the autocompleter! Any ideas how to fix this? Please help! Thank you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic