Monday, March 26, 2012

How do i change the source code for an extender?

Hi all,

I have searched the forums, documentation and google but haven't found any help yet (mayby i'm searching for the wrong things). I need to modify ModalPopupExtender and have found the code i need to modify in the ModalPopupBehaviour.js but how can i change that code so that everytime i use a modalopupextender in my project it uses my modified extender. I'm guessing that i have to build it/something again but is it the cs project that i got when i downloaded the toolkit?

Could someone point me in the right direction mayby there is some kind og guide or how to that i haven't found. Or explain what i need to do.

Lot's of thanks!

Thought i'd explain what i wan't to achive.

In the modalpopupbeahvoiur code this code creates the background div: 
this._backgroundElement = document.createElement('div');this._backgroundElement.style.display ='none';this._backgroundElement.style.position ='fixed';this._backgroundElement.style.left ='0px';this._backgroundElement.style.top ='0px';// Want zIndex to big enough that the background sits above everything else // CSS 2.1 defines no bounds for the <integer> type, so pick arbitrarilythis._backgroundElement.style.zIndex = 10000;if (this._BackgroundCssClass) {this._backgroundElement.className =this._BackgroundCssClass; }

I want to attach an onclick animation so that if a user clicks the background div then the modalpopup itsel should pulse. I thought of changing the above javascript code so that the div also got an id to witch i could attach the animation extender. But i don't know how to make my changes to the javascript code reflect in my project (see original post).

Is there perhaps an other way to create this animation? It should be somethink like if you bring up IE's properties window and click somewhere outside of it then the header flasehs.

Thanks again


I've shown how to modify the Javascript in an existing extender (in this case the ListSearch extender, to speed it up with massive lists) here:

http://damianblog.com/2007/06/19/speeding-up-listsearchextender/

You should be able to do the same kind of think with your changes to the ModalPopup. The key is to ensure that your web project references the newly build toolkit DLL.

Damian


Thanks! I'll check that out and get back when I get it to work! :)


I got it to work and thanks for your reply!

If anyone else wonders or reads this what i needed to do was to open the project file that was in the toolkit catalog and make my changes in the .js file then rebuild the project and make sure that my project (where I needed to use the changed extenders/behaviors) referenced to that newly build toolkit DLL in the toolkit bin debug or release folder.

/peronn

No comments:

Post a Comment