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.

What exactly are parameters in javascript (or any programming language for that matter) -


i have piece of code i've written , read in order work correctly must use parameters did , works perfectly, cant figure out life of me parameters , how work. read through ton of articles on web couldn't figure out how parameters work. how 1 parameter know grab instructions another. whole idea frustrating. kind of side question. can getelementby class instead of id or there similar getelementbyid() classes? in advance.

below code in script.js file:

function setvalue(field) {     if(''!=field.defaultvalue)     {         if(field.value==field.defaultvalue)         {             field.value='';         }         else if(''==field.value)         {             field.value=field.defaultvalue;         }     } } 

and called script run code below:

<textarea  id="info"             class="textarea"             name="comment"             cols="40" rows="10"             onfocus="setvalue(this)"             onblur="setvalue(this)">                whats name </textarea> 

parameters

if "parameter" mean "argument", it's not @ clear mean "how 1 parameter know grab instructions another." arguments/parameters don't grab "instructions" each other.

since it's not @ clear you're asking here, won't go kind of detail, warn function arguments work bit differently in javascript in many other languages c, c#, or java.

the traditional model special memory area called "stack": caller pushes arguments onto stack, , callee (the function being called) pulls them off stack.

javascript doesn't use stack model, though. instead, when function called, object called execution context allocated, , along called variable object, , arguments (and few other things) end being properties on variable object. (this happens invisibly behind scenes, don't direct references either object, fact of them clear edge case behaviors.)

getting elements class name

there's getelementsbyclassname widely-supported except ie. if search "getelementsbyclassname ie" you'll find variety of implementations ie can drop page.


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 -