Click here to Skip to main content
15,886,757 members
Articles / Programming Languages / Javascript
Tip/Trick

Ajax provide alternative of document.getElementById()

Rate me:
Please Sign up or sign in to vote.
3.08/5 (6 votes)
5 Jan 2010CPOL 14.4K   1   2
In Javascript if you want to access any control, the syntax would be like thisdocument.getElementById('');The alternative of this syntax while using Ajax is$get(''); Enjoy CodingMehul Thakkar
In Javascript if you want to access any control, the syntax would be like this
document.getElementById('<%= Control.ClientID %>');


The alternative of this syntax while using Ajax is
$get('<%= Control.ClientID %>'); 


Enjoy Coding

Mehul Thakkar

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
India India
Mehul Thakkar is having 8 yrs of experience in IT industry. He is having good command over Ms .Net and Ms Sql Server

Comments and Discussions

 
QuestionIs this some function provided by an Ajax library? Pin
Helbrax5-Jan-10 3:40
Helbrax5-Jan-10 3:40 
AnswerRe: Is this some function provided by an Ajax library? Pin
Mehul M Thakkar5-Jan-10 17:21
Mehul M Thakkar5-Jan-10 17:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.