Re: I can't find $get syntax information

Tech-Archive recommends: Speed Up your PC by fixing your registry



Thank you Anthony,

That is VERY important to know.
I did not knowingly include any Microsoft JS files in my code.
When I look at the HTML source in the IE7 browser I can't find any function
declaration for $get() or a reference to the .js file.
But I have a bunch of 3rd party controls that that generate almost
unreadable JavaScript, so maybe I missed it.
I am now wondering if the IE browser simply interprets it correctly.

Have a good day.

"Anthony Jones" <Ant@xxxxxxxxxxxxxxxx> wrote in message
news:umB%23agqtIHA.1316@xxxxxxxxxxxxxxxxxxxxxxx
"John Kotuby" <jkotuby75@xxxxxxxxxxx> wrote in message
news:%23yzS$WqtIHA.3804@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I was just looking at some example code in the VS2008 help for VB. In a
JavaScript example I came across some syntax that I didn't recognize and
could not find information about on the usual JS sites I use as
resources.
In a place where I expected to see
"document.getElementById('elementId')",
instead the Microsoft example use the syntax "$get('elementid')".

So I tried it in some of my code and it seems to work fine.

Can somebody explain this short-hand syntax to me or at least point to a
resource where I can read about it? It sure beats the heck out of typing
document.getElementById.

I just want to make sure I won't run into any compatibility problems if I
start using that syntax regularly.



Something in the JS files included by MS adds this function:-

function $get(id) { return document.getElementById(id); }

$get isn't defined by the script context.


--
Anthony Jones - MVP ASP/ASP.NET




.



Relevant Pages

  • Re: New Table via ASP?
    ... Here's a link to a page on the Microsoft MSDN web site that has the complete ... syntax for what you want, as well as other helpful Access Jet SQL syntax: ... > "Kevin Spencer" wrote in message ...
    (microsoft.public.frontpage.client)
  • Re: syntax question in dealing with .Net api
    ... we've got two apps, one in java, one in .Net, and we're trying to put ... only the read-style syntax works in exterior languages (Perl is our ... referring to what Microsoft call 'properties' in OLE/COM? ... some sort of OLE-compatibility layer in other languages. ...
    (comp.lang.perl.misc)
  • Re: MS to stop allowing passwords in URLs
    ... > I just read that Microsoft will stop allowing IDs and passwords to be ... > I personally use this syntax in only one production application, ... the address bar of an Internet Explorer window''. ...
    (Bugtraq)
  • Re: Simple Syntax Question
    ... Pat ... >Doug Steele, Microsoft Access MVP ... >> MS Access XP and I have a really simple syntax ... >> SubForm to the Main Form but ONLY IF LogicalCubeName ...
    (microsoft.public.access.modulesdaovba)
  • MS to stop allowing passwords in URLs
    ... I just read that Microsoft will stop allowing IDs and passwords to be ... I personally use this syntax in only one production application, ... Click the applet and it opens a browser window with the ... relatively safe given the convenience it provides. ...
    (Bugtraq)