question about $get in ajax scriptAction

Hi,

i'm learning ajax and i found this code in one of the sample (aspx)  files:

<ScriptAction Script="Cover($get('flyout'), $get('info'));" />

'Cover' is a javascript function, but what is '$get'? Is this the same as 
document.getElementById ? If yes, which advantage has it?

Thanks
Luc 


0
Luc
2/14/2010 10:35:59 PM
dotnet.framework.aspnet 1425 articles. 0 followers. Follow

2 Replies
627 Views

Similar Articles

[PageSpeed] 36

"Luc" <qcqsc@qscqs.fr> wrote in message 
news:%234%235TYcrKHA.4236@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> i'm learning ajax and i found this code in one of the sample (aspx) 
> files:
>
> <ScriptAction Script="Cover($get('flyout'), $get('info'));" />
>
> 'Cover' is a javascript function, but what is '$get'? Is this the same as 
> document.getElementById ? If yes, which advantage has it?
>
> Thanks
> Luc

It is a special function reference in the Microsoft AJAX Scripting Library 
and yes, it is the same as document.getElementById().

There is no advantage, per se, to using it, other than it's a lot easier to 
type than document.getElementById().

The whole point of the AJAX Scripting Library is that it exposes 
functionality that would take the developer a lot longer to write if they 
had to write it by hand.  You'll find that the library mimics the server 
side .NET Framework in many ways, offering (among other things) similar 
namespaces and object properties and methods that don't exisit natively in 
JavaScript.

-Scott 


0
Scott
2/14/2010 11:13:25 PM
Thanks
"Scott M." <s-mar@nospam.nospam> schreef in bericht 
news:O4nFwscrKHA.732@TK2MSFTNGP06.phx.gbl...
>
> "Luc" <qcqsc@qscqs.fr> wrote in message 
> news:%234%235TYcrKHA.4236@TK2MSFTNGP02.phx.gbl...
>> Hi,
>>
>> i'm learning ajax and i found this code in one of the sample (aspx) 
>> files:
>>
>> <ScriptAction Script="Cover($get('flyout'), $get('info'));" />
>>
>> 'Cover' is a javascript function, but what is '$get'? Is this the same as 
>> document.getElementById ? If yes, which advantage has it?
>>
>> Thanks
>> Luc
>
> It is a special function reference in the Microsoft AJAX Scripting Library 
> and yes, it is the same as document.getElementById().
>
> There is no advantage, per se, to using it, other than it's a lot easier 
> to type than document.getElementById().
>
> The whole point of the AJAX Scripting Library is that it exposes 
> functionality that would take the developer a lot longer to write if they 
> had to write it by hand.  You'll find that the library mimics the server 
> side .NET Framework in many ways, offering (among other things) similar 
> namespaces and object properties and methods that don't exisit natively in 
> JavaScript.
>
> -Scott
> 


0
Luc
2/15/2010 11:18:03 PM
Reply:

Similar Artilces:

Getting Chart Point info
Hi - I am building a "drill down" chart. When you click on one of the points of the chart, it takes you to anohter chart based on the informaiton on the point. I am using the MouseUp event and I have the Arg1 and Arg2 data. What I don't have is the actual "name" of the point. If you mouse over the point it will tell you the "name" of the series and the "name" of the point. How do I get this "name"? Arg2 simply tells me which point (1,2,3,4 etc.) in the series. I need the name. thanks Lizzard ...

Pivot Table Question #12
I've created a pivot table and it works well - counts the number of items in each category. What it doesn't do is count the number of blank cells. It gives me a blank category but, alas, it is blank. I want the blank category line to tell me how many blank cells I have. I know that this is possible, but just can't seem to make it work. Can someone help? Thanks! To count the blanks you could use a space character, or the formula ="", in the source data, instead of leaving the cells blank. The pivot table will be able to count those. Betty Csehi wrote: > I&#...

General question re Error Handling
hello experts This is just a general question for my own education. I've dabbled in a fair amount of Access VBA in the past, but have just started learning about Excel VBA. In Access, we would use Error Handling in almost every sub, but In Excel, error Handling seems to be the exception rather than the rule. I can't even find much about it in the Excel VBA help, and there are relatively few references to it in this forum. What gives? Just Curious Terry W. Terry, I use it all the time. My favorite approach is: Public Const bDebug as boolean = true or false (de...

SMTP - ISP Question
Hi everyone, please accept my apologies in advance if this slightly off-topic but I though this would be a good place to ask... I am looking for some recommendations for a UK ISP who will register a domain (web hosting not terribly important) and will provide me with an SMTP feed. I have the connection and the public IP addresses already so I do not need a bundled service. Many thanks to all in advance, Kapa ...

a Solver question
Hi, I am trying to use Solver to solve a scheduling problem. We get orders every Sunday, and then schedule the production for the following week. The order is as follows: Prod1 Prod2 Prod3 M 4 1 T 1 W TR 2 1 F 1 SA S 2 The numbers indicate the amount of products we need produced BY this day. And we have schedule tables for two plants like this: Plant 1: Prod1 Prod2 Prod3 M x11 x12 T x21 x22 W x31 TR .... ... ...

Mo2004
Recently ( a few months ago) I started using MS Money 2004. Previously I had been managing finances on excel with formulas I had created. This was wroking great but someone suggested to switch to financial software to make things flow a bit easier. Since using Money 2004 I have had some struggles: #1 - My budget varies from month to month (who's doesn't?). Whenever I make changes to my budget it apears to retroactivly change all previous months. How can I get it to just change any given month? Along the same lines, can I make adjustments to prior months? #2 - At the end of...

Compatiibility question
Hello Since I am going to college I qualify for the academic version of Publisher 2003. If I buy the academic version is this completely compatable with Publisher 2003? I anticipate sharing files with friends who have Publisher 2003. One other short question is when is a new version of Publisher coming out. Thanks Paul I was not aware of an Academic priced version of Publisher 2003. However, there is only one version available, so both will be 100% compatible. The next version of Publisher is due out October/November of 2006. -- Brian Kvalheim Microsoft Publisher MVP http://www....

CMFCPropertyGridCtrl
Hi All, I have an MFC application with a TreeView and a CDockablePane Properties Window. When I select a tree item - I display its properties in the properties window. That works. But I don't know how to change the tree item properties when I change the values in the properties window. My problem is in getting the values from the properties grid. I tried to override EndEditItem method like this: BOOL CMyMFCPropertyGridCtrl::EndEditItem(BOOL bUpdateData) { CMFCPropertyGridProperty* currProperty = GetCurSel(); if(currProperty) { //I don't like this implementa...

simple checkbox question
I really dont know much about VBA and/or macros and have what probably is an extremly basic question. I wasnt sure how to word it so when trying to search it i didnt really get any answers. all I want to do is add several checkboxes to a spreadsheet, if the user checks the box, I want the cell underneath it to be equal to 1, or any number or letter, it doesnt matter. i just used 1 in an IF formula but can change it if needed. what i am doing is a timesheet so that users can keep track of how many hours they worked each day, and if that day is a holiday, i want them to be able to use the ch...

Example of use WM_PRINTCLIENT and getting bitmap from invisible wnd
Hi, I had take a look to other post about this argoument, but I can't bitBlit ( or something similar ) the content of a window into another when the first is partially or completly invisible. I've succesfully grab the WM_PRINTCLIENT message in this way: ........... //{{AFX_MSG(CTest_Dlg) virtual BOOL OnInitDialog(); afx_msg LRESULT OnPrintClient(WPARAM wParam,LPARAM lParam); DECLARE_EVENTSINK_MAP() //}}AFX_MSG ................. .......... LRESULT CTest_Dlg::OnPrintClient(WPARAM wParam,LPARAM lParam) { HDC const hDC =(HDC) wParam; CDC *const pDC = CDC::FromH...

When mail merge, I get this error, Pubmerge "out of memory"
I am trying to mail merge and I get the error Pubmerge "out of memory" I am using publisher 97 and Excel 2002 Save the data as a CSV (comma delimited), could be a solution. Are your MDAC components current? PUB97: How to Obtain Publisher 97 Knowledge Base HTML Help File http://support.microsoft.com/kb/185798/en-us -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "r5j4g" <r5j4g@discussions.microsoft.com> wrote in message news:BC339DE0-5122-4FBB-AD03-C6941B3E22A0@microsoft.com... >I am trying to mail me...

HTTP and HTTPS sessions question
Some secure sites have HTTPS session stay secure from login till end of communication with site(log off). Some sites are HTTPS only when log in, after login, they become HTTP, and become HTTPS only when log off. (Yahoo mail for example, etc) What are the chances that session can be intercepted and sidejacked and traffic content recorded, especially as I know this danger really exists, and its carried purposefully and intentionally, by recording DSL traffic. http://www.google.com/search?hl=en&source=hp&q=session+hijacking+attack&aq=3&aqi=g10&aql=&oq=sess...

Why do I keep getting repeated copies of the same incoming email
I have just upgraded to Outlook '03 and I have received 4 or 5 new separate emails, but have received numerous copies of each one - 310 copies at last count. Does anyone know why this is happening? On Tue, 12 Jul 2005 04:41:03 -1000, tcav80 <tcav80@discussions.microsoft.com> wrote: > I have just upgraded to Outlook '03 and I have received 4 or 5 new > separate > emails, but have received numerous copies of each one - 310 copies at > last > count. Does anyone know why this is happening? Do you have rules set up that make copies? What anti-virus software ...

Just register get US100
http://www.wealthtoolbox.com/?ref=ismailpj@streamyx.com ...

Cannot get mail to open on every try
I am currenty using version 2009 (Build 14.0.8064.0206) If I do not open in certain order, 1) mail 2) web browser and close in the same order the next time I try to open mail nothing happens and I have to restart the computer. Can anyone help with suggestions??? You need to update to 14.0.8089.0726 There is a known bug in your version where WLM does not always completely shutdown. That prevents it from starting again because its still running. This problem is fixed in the latest version available here: http://download.live.com -- Mike - http://TechHelp.Santovec.us ...

IF Statement Question
Hello, I have the following statement that does what I want =IF(G10=3,-3,IF(G10=4,-2,IF(G10=5,-1,IF(G10=9,1,IF(G10=10,2,IF(G10=11,3,0)))))) If the random number is between 3 and 11, a value is generated, my problem is if the number is either a 2 or a 12, I want to get another number For example Random Number List 1 List 2 2 --- 8 7 0 n/a 12 --- 4 So if a number is between 3-11,...

CODE: get current dir of MDB file
I will be posting a few short snippets of code. Many of you coders already know these, but they should benefit other people as well. Here is code to find the current directory of the MDB file you currently have open. This is useful for saving output files (like report PDFS, text files, etc) to the same dir as your MDB file. It returns the current directory with a trailing backslash. Function CurrentDBDir() As String Dim strDBPath As String Dim strDBFile As String strDBPath = CurrentDb.Name strDBFile = Dir(strDBPath) CurrentDBDir = Left(strDBPath, Len(strDBPath) - Len(strDBFile)) End...

Licensing question
Could a 2 lane license be used for a company that has 2 separate stores with separate databases that are on the same network? Could there be a 3rd computer on that network that could switch from database to database to run reports, order and receive for both of these inventories? Or would they need to get HQ? Pat You could look at the Multi-Location add-in from Retail Realm (http://www.retailrealm.us) . It may fit your needs, but the two locations would be considered a single store. What you are asking will not work though, two databases means 2 dongles. The third management station...

How how do I get a ligature tie bar below two characters? Help
The unicode character is 035C. I am using Word 2007 with Windows XP. When I type the character between the two letters, select it, and key in ALT x, I get the box that indicates a missing symbol. I can't find the symbol in the Arial Unicode MS set under IPA extensions, yet it is an IPA symbol and it does have a unicode character. Is there any way to make this work? (If this appears twice, forgive me. I am new to this discussion and am having some difficulty posting.) On Nov 15, 5:10=A0pm, Pamela Case <PamelaC...@discussions.microsoft.com> wrote: > The unicode chara...

Exchange 2003
Does Exchange 2003 finally address a major shortcoming of 2000 in that mail inbound that isn't resolved (bad address or whatever the case may be) cannot be forwarded to a specific mailbox? I am currently using 2000 and the hack/workaround with a VB COM component and second virtual server... I would like to upgrade to 2003 but I need to know if I this issue has been fixed. Thanks -- russ "Russ Bishop" <nowhere> wrote in message news:eQUSPPRtDHA.2136@TK2MSFTNGP10.phx.gbl... > Does Exchange 2003 finally address a major shortcoming of 2000 in that mail > inbound that...

Get Window Pixel
Hello: I have a pixel on the screen that I'm trying to obtain the color. The pixel is found in a static control, which is a class derived from CStatic. class CReflectColorWnd : public CStatic I've tried many ways to obtain the pixel, but I cannot attain the COLORREF of the pixel. I'm wondering if anyone would be kind enough to assist me. I've tried the following in the paint handler. void CReflectColorWnd::OnPaint() { CStatic::OnPaint(); // Call original paint CClientDC dc(this); CBitmap bm; bm.CreateCompatibleBitmap(&dc, 100, 100); CDC memDC; memDC...

Subtract MM/DD/YYYY and get # months
I have a vacation earning chart where employees earn xx hours per pay period. When they have worked over xx months, they earn yy hours per pay period. I need a way to subtract their start date from the currend end-of-pay-period date to see where they fall in the leave earning chart - the catch is the answer has to be in months. I'm using Excel 2003. Any ideas? TIA, Carole O =DATEDIF(start_date,end_date,"m") will give you the number of months between start_date and end_date -- Regards, Dave <!-- "Carole O" wrote: > I have a vacation earning chart ...

Opening XLS file directly and getting params
All, I am working on a .NET application sued to "index" our many (+300) Excel 2000 reports. The users log in and get a list of reports that they are allowed to run. When they click on the "link", the app starts the appropriate spreadsheet. We are current doing this by running: Excel.exe "FILENAME" /e/PARAMETERS As you can see above, we are sending params (in this case, a connect string) into the spreadsheet (not my design, I inherited it...) and using some API calls that were found here to read the command line. This is working correctly, However, one of our...

Getting 552 Requested mail action aborted: (from one user on Hotmail)
I have a home user that is using a Hotmail account to communicate with our company. She can email us perfectly fine when she composes a new message...however, when she attempts to reply to a message sent from us, she is getting back and undeliverable message as follows: name@domain.com SMTP error from remote mailer after end of data: host mail.domain.com [xx.x.xxx.xx]: 552 Requested mail action aborted: exceeded storage allocation She gets this message even with no attachements. The host domain name and IP address are both correct as well as the email address (obviously since...

Offline Address book question.
Several articles about OAB referes to "siteFolderServer" attribute in AD. However I'm bit confused as to which object in AD is being referred. What I found that at least two Exchange objects has "siteFolderServer" attribute. - CN=Default Offline AddressList,CN=Offline Address Lists,CN=Address Lists Container,CN=<FIRST ORGANIZATION>,CN=MICROSOFT EXCHANGE,CN=SERVICES,CN=CONFIGURATION,DC=*,DC=local" - CN=First Administrative Group,CN=Administrative Groups,CN=<First Organization>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=*,DC=local Can an...