重写 ActiveX 功能的好方法是什么?
我工作的地方的所有内部网页都是专门为 IE 6 设计和构建的,但现在他们要我研究如何迁移到 Firefox 和 Safari 以及其他主要浏览器......并且 ActiveX 无法在火狐。
那么,采用当前 ActiveX 功能并完全废弃 ActiveX 并重写该功能的好方法是什么?基本上,我正在寻找关于什么是让事情在 Mac 上的浏览器上运行的良好解决方案的建议?
使用 Java Applet 或 ActionScript 重写是个好主意吗?经过一些研究后,发现没有办法在 Mac 上集成 ActiveX,那么有哪些可能的解决方案可以使事情在 Mac 上运行呢?
如果我的解释不清楚,请告诉我......我会尽力解释得更好。
更新:一些 ActiveX 功能的示例:
var rp_UserSettings = null;
var xmlhttp = new ActiveXObject("MSXML2.XmlHttp");
var serverResponseGet = "";
var serverResponseSet = "";
var serverResponseErrorDesc = "";
var rpFieldInfo = null;
var results = [];
/*Retrieves the user profile xml and stores it as an XML DOM in rp_UserSettings.*/
function retrieveUserSettings(){
var PageURL = RoamProfURL + '/getprofile' + '?today=' + escape((new Date()).toString());
xmlhttp.Open("GET", PageURL, false);
xmlhttp.Send();
rp_UserSettings = xmlhttp.responseXML;
serverResponseGet = xmlhttp.responseText;
rp_retCode = rp_UserSettings.selectSingleNode("//returncode");
if (rp_retCode == null){
rp_UserSettings = null;
}
return ;
}
谢谢, 赫里斯托
All of the internal web pages at the place I work were designed and built specifically for IE 6, but now they want me to research what it would take to move to Firefox and Safari and other major browsers... and ActiveX does not work in Firefox.
So what would be a good way to take what is currently the ActiveX functionality and totally scrap ActiveX and rewrite the functionality? Basically, I'm looking for suggestions on what would be a good solution to making things work on browsers on Mac?
Is it a good idea to rewrite using Java Applets or ActionScript? After doing some research, there is just no way to integrate ActiveX on a Mac so what are possible solutions to make things work on Mac?
Let me know if my explanation is unclear... I'll try to explain better.
UPDATE: an example of some ActiveX functionality:
var rp_UserSettings = null;
var xmlhttp = new ActiveXObject("MSXML2.XmlHttp");
var serverResponseGet = "";
var serverResponseSet = "";
var serverResponseErrorDesc = "";
var rpFieldInfo = null;
var results = [];
/*Retrieves the user profile xml and stores it as an XML DOM in rp_UserSettings.*/
function retrieveUserSettings(){
var PageURL = RoamProfURL + '/getprofile' + '?today=' + escape((new Date()).toString());
xmlhttp.Open("GET", PageURL, false);
xmlhttp.Send();
rp_UserSettings = xmlhttp.responseXML;
serverResponseGet = xmlhttp.responseText;
rp_retCode = rp_UserSettings.selectSingleNode("//returncode");
if (rp_retCode == null){
rp_UserSettings = null;
}
return ;
}
Thanks,
Hristo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
@Jason 有一个很好的观点这里 关于 Javascript /Query 和 HTML5,事实上它确实取决于您的 activex 实际在做什么。
如果您的网站需要直接与客户端操作系统交互,那么您需要一个可以在客户端计算机上运行的解决方案(ActiveX(专有且痛苦)或 Java)。如果您的网站只是收集用户数据,那么您可以使用服务器端解决方案,并且您的网站将与浏览器无关。
您可以在服务器端提供许多功能,而您的浏览器不再重要。例如,如果您选择使用 ASP.NET,则您运行 Windows Server,并且无论客户端浏览器如何,服务器都会执行所有工作。
@Jason has a good point here with regards to Javascript /Query and HTML5, and the fact that it really does depend on what your activex is actually doing.
If your website needs to directly interface with the client Operating System, then you need a solution that can run on the Client computer (ActiveX (Proprietary and Painful), or Java). If your website is just collecting User Data, then you can use a server side solution and your website will be browser agnostic.
You can provide a lot of functionality server side where your browser doesn't matter anymore. For example, if you chose to use ASP.NET, then you run a Windows Server and the server does all of the work regardless of the client browser.
这取决于您的 activex 提供的功能。很多以前需要activex的功能现在可以通过JavaScript和HTML5来实现。
对于Mac来说,你有一个非常好的HTML 5平台Safari。
It depends on what functionality your activex provided. A lot of functions that used to need a activex now can be implemented by JavaScript and HTML5.
For mac, you have a very good HTML 5 platform of Safari.
您是否使用 ActiveX 与浏览器和/或操作系统交互?如果没有,您的整个应用程序可能会变成使用 JavaScript 的 RIA Web 应用程序。如果您还想针对不支持 Flash 的 iPad,则 ActionScript (Flash) 可能不是一个好主意。
您可以使用浏览器(Java 小程序)或桌面(Java)应用程序,但如果您可以使用 Web 应用程序和动态 HTML 来完成此操作,则可能有点过头了。
我一直在将旧的桌面应用程序转换为 Web 应用程序,而浏览器确实可以构建一个漂亮的、轻量级的 GUI/客户端。
Are you using ActiveX to interface with the Browser and/or OS? If not, your whole application could probably be turned into a RIA web application using JavaScript. ActionScript (Flash) may not be a good idea if you also want to target the iPad, which doesn't support Flash.
You could go with a browser (Java applet) or desktop (Java) application, but it might be overkill if it's something you can do with a web application and dynamic HTML.
I've been converting things over from legacy desktop applications to web applications, and the browser really does make for a nice, light weight GUI/client.