Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Replaced elements and duplicate action calls lead to loss of hair

I have a view in my monorail project that has this element:

<img id="tab-direction" alt="tab direction toggle" src=""/>

This is being observed by jQuery to toggle the image and do some client-side script along the way. Note that the src attribute is empty. What I didn't realize is that the default behaviour for this will be to call the request again to the only url it knows; the address in the address bar...meaning my action is now being called TWICE which can really be a problem .

The fix was to simply put some dummy value in there and let the script replace it as intended, but man that took WAAAAY too long to figure out.

Part of the problem was because I am using an uncommitted patch to have my dynamic action providers resolved through Windsor and I was paranoid that I had done it wrong....

But thankfully my paranoia was unfounded...I think...I mean, it probably is ...I hope so... :)


Posted 01-18-2008 1:58 PM by Michael Nichols

[Advertisement]

Comments

Hardware IT Blog » Blog Archive » Replaced elements and duplicate action calls lead to loss of hair wrote Hardware IT Blog &raquo; Blog Archive &raquo; Replaced elements and duplicate action calls lead to loss of hair
on 01-18-2008 6:15 PM

Pingback from  Hardware IT Blog  &raquo; Blog Archive   &raquo; Replaced elements and duplicate action calls lead to loss of hair

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)