473,473 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

prototype and activex?

Hi all

Im trying to use prototype for an xmlhttprequest, but it doesn't seem
to be working cross-browser. Is there someway of getting it to be IE6
compatible (active x)?

here's my code so far, because of the level of abstraction, i guess i
would need to edit the prototype.js file?

<script type="text/javascript" src="includes/javascript/prototype.js">
</script>

function getAssociateData() {

new Ajax.Updater("results", "index.php", {
asynchronous: true,
method: "get",
parameters: "",
//onFailure:
});

}

Feb 10 '07 #1
6 2522
libsfan01 wrote:
Im trying to use prototype
Javascript is a language that uses prototype based inheritance, in which
functions have - prototype - properties which refer to objects that will
be used as the base of a prototype chain for objects constructed with
those functions, and is employed in resolving property name on those
constructed objects. If you speak of using "prototype" in the context of
javascript it is these aspects of the language that you will initially be
assumed to be referring to. If you want to talk about an unwisely named
third party product then you should qualify its lable.
for an xmlhttprequest, but it doesn't seem
to be working cross-browser.
As Prototype.js is not ECMAScript compliant it should not be expected to
work in any modern browser, and so not be expected to work cross-browser
(but it was never designed to be cross-browser anyway).
Is there someway of getting it to be IE6
compatible (active x)?
IE 6 is one of the few browsers where the script environment has been
observed to comply with Protoype.js's expectations of its environment. So
it (prototype.js) should 'work' in IE 6.
here's my code so far, because of the level of abstraction,
i guess i would need to edit the prototype.js file?
The Prototype.js code is so convoluted and interdependent that I would be
reluctant to attempt to modify it. XML HTTP requests are very simple
things in themselves, and examples of code that employs them directly is
readily available.
<script type="text/javascript" src="includes/javascript/prototype.js">
</script>

function getAssociateData() {

new Ajax.Updater("results", "index.php", {
asynchronous: true,
method: "get",
parameters: "",
^
The contents of an object literal may not end with a comma, that is a
syntax error. Any browser that does not disregard that syntax error
(which should be all, but will probably just be most) will never execute
this code.
//onFailure:
});
Richard.

Feb 10 '07 #2
libsfan01 wrote:
>
Im trying to use prototype for an xmlhttprequest, but it doesn't seem
to be working cross-browser. Is there someway of getting it to be IE6
compatible (active x)?
Problem 1: "prototype.js" is far from cross-browser capable in itself.
Problem 2: "activex" is not and will *never* be cross-browser capable.

In the first problem, you have to rely on the dreadful implementation
of prototype handling by the included code. It should be fine in IE6,
but not, I suspect, in many other browsers (quite possibly including
even IE7 - does anyone know if it works with the new IE browser?)

In the second problem though, you are *specifically* making the code
non-compatible by using ActiveX - since that is *specifically* a
Microsoft Windows code capability. It is not and can never be
cross-browser capable since cross-browser capability requires that it
does not use any proprietary and restricted code types such as ActiveX.
Feb 19 '07 #3
The Magpie said the following on 2/19/2007 1:46 PM:
libsfan01 wrote:
>Im trying to use prototype for an xmlhttprequest, but it doesn't seem
to be working cross-browser. Is there someway of getting it to be IE6
compatible (active x)?
Problem 1: "prototype.js" is far from cross-browser capable in itself.
Not the problem.
Problem 2: "activex" is not and will *never* be cross-browser capable.
Nobody said any different. But it still isn't the problem.

Be wary of saying never though. They said document.all would "never be
cross-browser"..........
In the first problem, you have to rely on the dreadful implementation
of prototype handling by the included code. It should be fine in IE6,
but not, I suspect, in many other browsers (quite possibly including
even IE7 - does anyone know if it works with the new IE browser?)
Define "works".
In the second problem though, you are *specifically* making the code
non-compatible by using ActiveX - since that is *specifically* a
Microsoft Windows code capability.
He didn't ask about relying on ActiveX. The question was why the code
didn't work. And the problem with the code was a comma.
It is not and can never be cross-browser capable since cross-browser
capability requires that it does not use any proprietary and restricted
code types such as ActiveX.
Are you saying that any code that uses an ActiveX component can never be
cross-browser? I say you are totally wrong about that. If the ActiveX
path is the only path, then no it isn't cross-browser. But, it is quite
simple to write a "cross-browser" AJAX app that uses an ActiveX
component when there is not native HTTPRequest object and the ActiveX is
available.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 20 '07 #4
Randy Webb wrote:
>
I may have missed the OP that stated the specific problem and was
responding only to the quoted text in my reply.
>
Are you saying that any code that uses an ActiveX component can never be
cross-browser? I say you are totally wrong about that.
No, I am not saying that. What I am saying is that code which
*depends* on the use of an ActiveX cannot, by definition, be
cross-browser compatible since it specifies what the capabilities of
the browser must be and that specification is proprietary.
Feb 20 '07 #5
The Magpie said the following on 2/20/2007 9:00 AM:
Randy Webb wrote:
I may have missed the OP that stated the specific problem and was
responding only to the quoted text in my reply.
How do you miss a post that you replied directly to?
>Are you saying that any code that uses an ActiveX component can never be
cross-browser? I say you are totally wrong about that.

No, I am not saying that. What I am saying is that code which
*depends* on the use of an ActiveX cannot, by definition, be
cross-browser compatible since it specifies what the capabilities of
the browser must be and that specification is proprietary.
And that is true. But, with regards to "AJAX" (as it is called), it is
*impossible* to write a single branch script that is "cross-browser".
You *must* write a branch for ActiveX and you *must* write a branch that
uses the native Object. Otherwise, it can *never* be "cross-browser".
And even then, you can not write a truly "cross-browser" (multi-browser
yes) AJAX script.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 21 '07 #6
Randy Webb wrote:
>
And that is true. But, with regards to "AJAX" (as it is called), it is
*impossible* to write a single branch script that is "cross-browser".
You *must* write a branch for ActiveX and you *must* write a branch that
uses the native Object. Otherwise, it can *never* be "cross-browser".
And even then, you can not write a truly "cross-browser" (multi-browser
yes) AJAX script.
I absolutely agree that you must. But the branch code can cater for
both cross-browser capability (W3C standards, at least) and whatever
proprietary code branches are needed - which might, at least in
future, not be just Microsoft-dependent.
Feb 22 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Elf M. Sternberg | last post by:
One of the complaints about prototype.js (google for it if you're not familiar with it) is that it's poorly documented. I have this inkling that the key to understanding prototype.js is in the...
8
by: Robert | last post by:
Hi, I can use "with" like this: function MyObject(message) { this.message = message; } function _MyObject_speak() {
2
by: stephane | last post by:
Hi all, What I am trying to achieve is an 'inherits' method similar to Douglas Crockford's (http://www.crockford.com/javascript/inheritance.html) but that can enable access to the superclass'...
4
by: lkrubner | last post by:
I'm reading an essay, I think one of Crockford's, and it has this example in it: function Demo() { } Demo.prototype = new Ancestor(); Demo.prototype.foo = function () { } ; Does Ancestor now...
8
by: Eric Clapton | last post by:
Can anyone please help me to build the VB code connect to a SQL 2000 server? If you can give me a prototype, that will be very helpful? Thanks.
45
by: bigdadro | last post by:
I've created a new class using prototype.js. After I make the ajax.request all references to this.myClassMethodorVariable are lost. Does the ajax method blow out the object persistance? I'm fairly...
5
by: dougwig | last post by:
I'm trying to handle the scenario where a user's session times out and and their ajax request triggers a redirection by the webserver (302 error?). I'm using Prototype 1.4 and the my works great...
5
by: Daz | last post by:
Hi everyone. My query is very straight forward (I think). What's the difference between someFunc.blah = function(){ ; } and
83
by: liketofindoutwhy | last post by:
I am learning more and more Prototype and Script.aculo.us and got the Bungee book... and wonder if I should get some books on jQuery (jQuery in Action, and Learning jQuery) and start learning about...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.