Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

javascript - Clearing a jQuery Form -


i have been doing research on way clear jquery form.

i have couple of ideas want know if has better way.

i know using reset, necessary set field particular value may not accomplished reset. (ie. if form starts pre-filled data , want clear it)

i have read discussion here: resetting multi-stage form jquery

but have idea post answer. please let me know think , if have better solution.

more information:

for example have address form. has couple of inputs, selects, radios, etc. along copy new button , clear button. default want have particular radio selected option 1.

<div id = "addresslist"> <div class = "address"> <input type="radio"/> --obviously options here <button>copy new</button> </div> </div> 

the user selected option 2 , clicks copy new. on click of click of copy new:

$("#addresslist").append($(this).closest("#address").html()); 

in second address secon radio button selected. user selects third radio button. @ point clicking reset button reset input option 2 not option one.

my solution add attribute called clear.

then $([clear]).val($(this).atrr('clear'))


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -