AjaxNS.AR - What is it?

O

ofiras

Hi,
I don't really know JavaScript or AJAX very well, so I have a question
- what does this code means:

AjaxNS.AR(\'ctl00$ContentPlaceHolder1$RoundsDDL\',\'\',
\'ctl00_ContentPlaceHolder1_Radajaxpanel1\', event)

I've been trying to search for what is "AjaxNS.AR", and I've also
searched for it and for the inputs in the JavaScript of the page, but
I didn't find anything so I guess it is a common function.
Please help me,
Ofir.
 
S

SAM

Le 6/12/09 1:05 PM, ofiras a écrit :
Hi,
I don't really know JavaScript or AJAX very well, so I have a question
- what does this code means:

AjaxNS.AR(\'ctl00$ContentPlaceHolder1$RoundsDDL\',\'\',
\'ctl00_ContentPlaceHolder1_Radajaxpanel1\', event)

I've been trying to search for what is "AjaxNS.AR", and I've also
searched for it and for the inputs in the JavaScript of the page, but
I didn't find anything so I guess it is a common function.
Please help me,

Probably RadAjax ? : <http://www.google.fr/search?q=RadAjax>
 
R

Richard Cornford

Hi,
I don't really know JavaScript or AJAX very well, so
I have a question - what does this code means:

AjaxNS.AR(\'ctl00$ContentPlaceHolder1$RoundsDDL\',\'\',
\'ctl00_ContentPlaceHolder1_Radajaxpanel1\', event)

Without all of the backslashes in front of the apostrophe symbols it
is a method call. There is an object that is referred to by the
Identifier - AjaxNS - that has a property named - AR - which will have
a value that is a function, and that function is being called (as a
method, so within the function's code the - this - keyword will be a
reference to the - AjaxNS - object (as opposed to the global object))
with 3 string primitive arguments and a final argument that is the
value of whatever is referred to by the Identifier - event (probably,
but not necessarily, an Event object). Or at least if that is not the
object structure then a runtime error will replace the syntax error
that would be corrected by removing the backslashes.

None of the objects/properties mentioned above are part of javascript
(or at least ECMAScript, as they could be language extensions in
ECMAScript implementations, though if they are I have never noticed
them). Instead they are probably objects defined in/created by some
pre-exiting piece of javascript code (such as a library or some
example code from somewhere). The above then is an attempt to employ
that pre-existing code in some way, but what it is doing, or why it is
doing it, can only be answered by looking at that pre-existing code
(or maybe its documentation, if any).
I've been trying to search for what is "AjaxNS.AR", and
I've also searched for it and for the inputs in the
JavaScript of the page,

Including javascript files imported by the page with <script
src="xxxxxxxx.js" ... elements?
but
I didn't find anything so I guess it is a common function.
<snip>

It is not a common function.

Richard.
 
T

Thomas 'PointedEars' Lahn

ofiras said:
I don't really know JavaScript or AJAX very well, so I have a question
- what does this code means:

AjaxNS.AR(\'ctl00$ContentPlaceHolder1$RoundsDDL\',\'\',
\'ctl00_ContentPlaceHolder1_Radajaxpanel1\', event)

I've been trying to search for what is "AjaxNS.AR", and I've also
searched for it and for the inputs in the JavaScript of the page, but
I didn't find anything so I guess it is a common function.

It isn't. The arguments remind me of an ASP.NET app, though.
Please help me,

<http://jibbering.com/faq/#posting>
<http://www.jibbering.com/faq/#debugging>


HTH

PointedEars
 
R

Richard Cornford

On Jun 12, 12:05 pm, ofiras wrote:

Without all of the backslashes in front of the apostrophe
symbols it is a method call. ...
... then a runtime error will replace the syntax error
that would be corrected by removing the backslashes

I had intended to mention that as you had presented it (with the
backslashes) the above means nothing in javascript terms because it
contains syntax errors and so could never be executed.

Richard.
 
O

ofiras

I had intended to mention that as you had presented it (with the
backslashes) the above means nothing in javascript terms because it
contains syntax errors and so could never be executed.

Richard.

Thanks for the explanation.
I did try to search for it all over the JavaScript (even in the .js
files) I used a Firefox extension that shows me all of the JavaScript,
including the .js files, but still I didn't find any AjaxNS. Is there
any chance it is somewhere else?
Thanks,
Ofir.
 
R

Richard Cornford

Thanks for the explanation.
I did try to search for it all over the JavaScript (even in the .js
files) I used a Firefox extension that shows me all of the
JavaScript, including the .js files, but still I didn't find
any AjaxNS. Is there any chance it is somewhere else?

However, the syntax error producing backslashes have yet to be
explained. There seems to be a very good chance that the code you
posted is part of a larger context. Specifically, that it is a chunk
of a string literal. And it may be that what gets done with that
string literal would provide the clues as to where - AjaxNS - is
defined. For example, there may be an attempt to have this code sent
to the server and executed there, which means that - AjaxNS - has to
be defined on the server. That would be an odd way of doing things,
but web developers do some very odd things at times.

Richard.
 
O

ofiras

However, the syntax error producing backslashes have yet to be
explained. There seems to be a very good chance that the code you
posted is part of a larger context. Specifically, that it is a chunk
of a string literal. And it may be that what gets done with that
string literal would provide the clues as to where - AjaxNS - is
defined. For example, there may be an attempt to have this code sent
to the server and executed there, which means that - AjaxNS - has to
be defined on the server. That would be an odd way of doing things,
but web developers do some very odd things at times.

Richard.

Well the code is taken from a working web page, and it doesn't execute
any error. I have no idea why (and actually I don't really mind).
I found the AjaxNS object. Apparently the code was collapsed
(shrieked) in the page of the JavaScript that was generated by the
Firefox add-on that I mentioned. Thought it doesn't really what I
expected. It is very very long and complicated, probably the bought
some sort of finished code and used it.
Thank you very much,
Ofir.
 
M

Michael J. Ryan

Hi,
I don't really know JavaScript or AJAX very well, so I have a question
- what does this code means:

AjaxNS.AR(\'ctl00$ContentPlaceHolder1$RoundsDDL\',\'\',
\'ctl00_ContentPlaceHolder1_Radajaxpanel1\', event)

I've been trying to search for what is "AjaxNS.AR", and I've also
searched for it and for the inputs in the JavaScript of the page, but
I didn't find anything so I guess it is a common function.
Please help me,
Ofir.

It looks like it's probably JS outputted by an ASP.Net controls package..
There are a number, ComponentArt, Telerik, etc. Couldn't say which offhand.
It could well be a custom class within your project.

it doesn't have any real meaning by itself...


--
Michael J. Ryan - http://tracker1.info/

.... B5: The bitch of it is that you probably did the right thing. But you did
it in the wrong way. In the inconvenient way. Now you have to pay the penalty
for that. I know it stinks, but that's the way it is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,098
Messages
2,570,625
Members
47,236
Latest member
EverestNero

Latest Threads

Top