I'm trying to run the following page on my desktop from my host
server. It works just fine if I run it from my desktop, but not if I
run it from the server. I get "Error: Permission denied" on the
"newActiveXObject" statement. I understand about the security issues
surrounding ActiveX, but since I'm not accessinig any client-side
files, I would think this should work. Any ideas would be
appreciated.
Thanks,
Don
<html>
<head>
<title>Test Script</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<script type="text/javascript">
//
// Get CPC index page 1
//
var sCPCIndexPage1URL = "http://www.google.com";
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("Get",sCPCIndexPage1URL,false);
xmlhttp.send();
var sCPCIndexPage1HTML = xmlhttp.responseText;
//
// Display page
//
window.open("javascript :opener.sCPCIndexPage1HTML" );
</script>
</body>
</html>
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =----- 9 5151
Don wrote: I'm trying to run the following page on my desktop from my host server. It works just fine if I run it from my desktop, but not if I run it from the server. I get "Error: Permission denied" on the "newActiveXObject" statement. I understand about the security issues surrounding ActiveX, but since I'm not accessinig any client-side files, I would think this should work. Any ideas would be
var sCPCIndexPage1URL = "http://www.google.com"; var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("Get",sCPCIndexPage1URL,false);
I don't think you get permission denied for ActiveXObject, you should
get it for the open call trying to open a connection to http://www.google.com/ as that is something the same origin policy
doesn't allow.
It works with local files as there IE doesn't implement the same origin
policy.
--
Martin Honnen http://JavaScript.FAQTs.com/
On Wed, 22 Sep 2004 17:13:10 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:
Don wrote:
I'm trying to run the following page on my desktop from my host server. It works just fine if I run it from my desktop, but not if I run it from the server. I get "Error: Permission denied" on the "newActiveXObject" statement. I understand about the security issues surrounding ActiveX, but since I'm not accessinig any client-side files, I would think this should work. Any ideas would be
var sCPCIndexPage1URL = "http://www.google.com"; var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("Get",sCPCIndexPage1URL,false);
I don't think you get permission denied for ActiveXObject, you should get it for the open call trying to open a connection to http://www.google.com/ as that is something the same origin policy doesn't allow. It works with local files as there IE doesn't implement the same origin policy.
Hi Martin,
Any idea how I can do this?
Regards,
Don
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Don wrote:
[cross domain XML access] Any idea how I can do this?
If it is just for your own purpose I think there is an IE preference you
can set on your IE browser, check the preferences, there should be
something like allow data access to sources from different domains.
If you want to do that in your web page when it is loaded in IE when
someone is visiting your site then that is not possible with client side
script, you would need server side scripting.
You can also try to write an HTML application (.hta file) if all you
want is implement the Google access for your own tests.
--
Martin Honnen http://JavaScript.FAQTs.com/
On Wed, 22 Sep 2004 17:44:23 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:
Don wrote:
[cross domain XML access] Any idea how I can do this?
If it is just for your own purpose I think there is an IE preference you can set on your IE browser, check the preferences, there should be something like allow data access to sources from different domains. If you want to do that in your web page when it is loaded in IE when someone is visiting your site then that is not possible with client side script, you would need server side scripting. You can also try to write an HTML application (.hta file) if all you want is implement the Google access for your own tests.
My plan is to run the script on server side. I've tried it there, but
that's when I get the error. How can I run it on server side and not
get the error?
Don
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Don wrote: [cross domain XML access]
My plan is to run the script on server side. I've tried it there, but that's when I get the error. How can I run it on server side and not get the error?
Do you have support for ASP scripting on your server? Otherwise you
can't run the code on the server.
On the server you should use code alike
<%@ Language="JScript" %>
<%
var httpRequest;
httpRequest = Server.CreateObject('Msxml2.ServerXMLHTTP.3.0');
httpRequest.open('GET', 'http://www.google.com/', false);
httpRequest.send(null);
Response.Write(Server.HTMLEncode(httpRequest.respo nseText));
%>
--
Martin Honnen http://JavaScript.FAQTs.com/
On Fri, 24 Sep 2004 15:38:33 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:
Don wrote:
[cross domain XML access]
My plan is to run the script on server side. I've tried it there, but that's when I get the error. How can I run it on server side and not get the error?
Do you have support for ASP scripting on your server? Otherwise you can't run the code on the server. On the server you should use code alike <%@ Language="JScript" %> <% var httpRequest; httpRequest = Server.CreateObject('Msxml2.ServerXMLHTTP.3.0'); httpRequest.open('GET', 'http://www.google.com/', false); httpRequest.send(null); Response.Write(Server.HTMLEncode(httpRequest.resp onseText)); %>
I'm going to run the script from the server, and not on the server.
It will be embedded in a web page, and be accessed by the client's
browser, like any other web site. It's just that when I run it from
the server I get that Error: Permission Denied.
Don
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
In article <32********************************@4ax.com>,
Don <no@adr.com> wrote: I'm going to run the script from the server, and not on the server. It will be embedded in a web page, and be accessed by the client's browser, like any other web site. It's just that when I run it from the server I get that Error: Permission Denied.
Don
Because when you run a script from a server, the permissions get
lowered. If you want to take the risk on your machine, you can set the
permission lower.
You may also be able to change the file type to hta but this is a guess
because I am not knowledge about hta.
I assume you are using IE. I avoid using IE because I do not like its
security model.
What folks are saying is that if you want your web page to run on the
Internet on any browser, you need to move the functions that jump out of
your web page and interact with the native machine on to a server.
Robert
Don wrote: [cross domain XML access]
I'm going to run the script from the server, and not on the server. It will be embedded in a web page, and be accessed by the client's browser, like any other web site. It's just that when I run it from the server I get that Error: Permission Denied.
Yes, and I have explained that browsers implement a same origin policy
so your script loaded from http://host1.example.com/ can only use Msxml
to load data from that domain http://host1.example.com/ and not from
other domains.
--
Martin Honnen http://JavaScript.FAQTs.com/
On Sat, 25 Sep 2004 12:17:41 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:
Don wrote:
>[cross domain XML access]
I'm going to run the script from the server, and not on the server. It will be embedded in a web page, and be accessed by the client's browser, like any other web site. It's just that when I run it from the server I get that Error: Permission Denied.
Yes, and I have explained that browsers implement a same origin policy so your script loaded from http://host1.example.com/ can only use Msxml to load data from that domain http://host1.example.com/ and not from other domains.
Hi Martin,
Thanks for that clarification. I think I understand now.
What construct would you recommend I use instead of Msxml?
Thanks, Don
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =----- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: kmunderwood |
last post by:
I am having trouble excluding select xml out to HTML using xsl
I want to ignore some xml and turn others red
I can not find the right way to both:
1. Only show the <tag> that want to, and...
|
by: Marcin Zmyslowski |
last post by:
Hello all!
I have installed MSDE on my local computer - Windows 2000 Professional.
I have created a function which runs me a link whose path is placed in
the input field. This function looks...
|
by: Andrew Hilton |
last post by:
When you create an object in classic asp code, should you always use
Server.CreateObject("ProgID")? Are there implications with stability (ie
memory leaks) if you create COM objects in other ways...
|
by: Jon Slaughter |
last post by:
When a user clicks a link I have it open up a file in a div using ajax.
my code is
<a href="#Find" onclick="javascript:jah('Find.html','content');">Find</a><br
/>
Where Find.html is an html...
|
by: mowsen |
last post by:
Hello Group,
i'm using a little "ajax" loader script to dynamically load files into
different "div" tags on my main site. the code for this part looks
like:
function loader() {
var args =...
|
by: RawMustard |
last post by:
Hi Folks, my first post here. Sorry to start with a request.
I'm having trouble executing python scripts compiled to byte code on ubuntu feisty server version. Basically I can type ./MyScript.py...
|
by: gradinafrica |
last post by:
I'm trying to create a log out button that uses AJAX to call a php file which ends the current session:
//logout.php
<?php
if (!session_start());
session_destroy(); //Destroys the...
|
by: matheussousuke |
last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails.
The goal is: Make it send the email with the URL...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
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,...
|
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...
| |