Acess JS API Through A Proxy Server?
Sep 14, 2010
I have an issue. I need to access MapQuest JavaScript API and develop maps. I am able to do that on my personal laptop. I want to develop the same on my work laptop and with in my company environment(network). I have
1. We have a firewall which doesn't allow me to access the Mapquest Javascript API.
2. I was give a proxy server name and port number through which I can access the mapquest javascript api.
I need to use this proxy server with in the code that is what the systems team say. I don't know how achieve this using JavaScript. I can't use any other language except Javascript or HTML.
View 1 Replies
ADVERTISEMENT
Jul 20, 2005
i am creating a page that creates 10-45 text input areas dynamically in a
for loop. all the fields will be identical except for content, and i need a
button to clear each corresponding field individually(also dynamically
created). i have tried to do it various ways, but i cant get the proper
object declared, i always get object does not exist or object undefined
errors. I dont even know what this is called so that i can look it up. im
kind of lost as how to solve it. Code:
View 2 Replies
View Related
Dec 9, 2011
I've been trying to figure out how to detect if a visitor is using a proxy. If seen php code similar to this again and again (just ignore the code since it doesn't work for anonymous proxy)
Code:
$proxy_headers = array(
'HTTP_VIA',
'HTTP_X_FORWARDED_FOR',[code]...
But as I mentioned this never works for anonymous proxies.However,every anonymous proxy I've tried puts THEIR domain somewhere in the url.Why can't we just detect anonymous proxy with Javascript by just getting
document.location.href
and making sure that the url is what it's supposed to be.This seems way too easy to be reliable.
View 7 Replies
View Related
Jul 20, 2005
Sorry if this isn't exactly the right NG for this, but I thought you guys would know better than anyone else.
I have 2 computers networked. The internet connection is dial-up, and I'm using ezProxy to share the connection. Both computers are Win98,and both have IE6.0.
The main PC works perfectly, but the second PC's browser doesn't recognize Javascript at all! I've gone through every setting imaginable, and haven't found any reference to Javascript that was
incorrect.
Anybody have an ideas?
View 1 Replies
View Related
Jan 27, 2011
my working project (needs a proxy): [URL]...currently working through this tutorial, I have setup a proxy and saved it as proxy.php[URL].. I just need to put this piece of code in my JavaScript but not sure where?!
[Code]...
View 1 Replies
View Related
May 31, 2007
An experiment i'm doing requires requires a synchronous cross-domain
request, without using a proxy. I wondered if anyone had any ideas to
help me achieve this.
Below is what I have tried, including my conclusions/assumptions
(which i'll happily be corrected on if it solves my problem!):
The requirement not to use a proxy means I can't use the synchronous
mode of XMLHttpRequest, as it will not let me go cross-domain.
On-demand loading of javascript enables me to achieve the cross-domain
request by loading javascript of the form:
callback(data);
which on loading calls callback(), but it is not obvious how to make
this synchronous. I've also managed to get the same effect using a
hidden IFRAME, but again it relies on a callback. Is there a good way
to wrap/transform this in to a synchronous request? Code:
View 6 Replies
View Related
Jan 28, 2010
I have set up a reverse proxy for a wordpress blog that is using the theme mystique. When I use IE to connect directly to the blog the theme works fine and loads ie7.css When I connect through the reverse proxy to the blog the theme does not load the ie7.css
From what I can work out it looks like the person who wrote it is using jquery to determine the browser type. Any ideas why jquery would fail when passed through a reverse proxy?
View 2 Replies
View Related
Oct 2, 2010
I have the following JavaScript (see below). The script requests an XML file from the server and displays it on the page.
The script works fine when the requested XML file is stored on the same server as the script.
The problem is when I try requesting an XML file from an external server such as the National Weather Service. I get an error. If I take the XML file from the National Weather Service and save it to my server it works. Why can't I use my script to request XML files stored on external servers?
Javascript Code
window.onload = initAll;
var xhr = false;
function initAll() {
document.getElementById("makeTextRequest").onclick = getNewFile;
[Code]....
View 8 Replies
View Related
Mar 11, 2010
I'm trying to write a script that will be loaded from one server into a website on another server. This script is trying to talk (ajax) to the server that it comes from but I'm getting "Access Denied" errors. I'm well aware that cross-domain calls are not allowed for security reasons so my question is how does Google Analytics work because essentially thats what I'm trying to accomplish. I can embed a Google Analytics script into my website and it'll gather data and send it back to Google.
View 4 Replies
View Related
Apr 19, 2010
I'd been looking for some way to get server date/time without using any server side script (such as ASP, PHP, etc).
I found this and it worked just excellent for me! I just want to share it because it wasn't easy to find.
I created a js document with code:
Code:
Now, I can use this js within a html like this:
HTML Code:
You may change your machine date/time and check both dates.
View 1 Replies
View Related
Feb 10, 2010
I would like to open an html file locally (not fetch it from a server) and somehow use javascript to fetch the relative resources from the server. One solution would be to convert all of the relative links to absolute links. I can convert the html source file anyway I wish, but ideally I would like to modify the html source as little as possible, for example insert a function that modifies the result of the src attribute. How would I go about this? Is there any trick I can use to define where the relative home is? Am I going to get into any scripting security gotchas?
View 3 Replies
View Related
Dec 31, 2006
I am creating an XML document on my page with javascript. My question
is, is it possible to save that xml file on the server (I have write
permissions) only using javascript, ie no server code? This task would
be trivial using server code, but I was wondering if I can do it all
with client code and post backs? Well, any input?
View 1 Replies
View Related
Dec 7, 2010
I already have a server connected to clients, clients send msgs and it echoes back to all of them and now i want when a client sends a msg it echoes on his server and the other server too .. so when any of the clients on any of the servers sends a msg it is broadcasted all over the servers to all clients
[Code]...
View 1 Replies
View Related
Jun 24, 2010
In ASP.Net, I am trying to create a WebControl. In this control, I have RenderControl method overridden with my html controls.
protected override void RenderContents(HtmlTextWriter output)
{
output.Write(@"<table><tr><td>");
[code]....
How can I make the button call the click event so that the server side method btnExecute_Click() can be called? Also, this button calls a javascript function before server side even.
View 5 Replies
View Related
Nov 24, 2010
I have an app which preloads images from a folder called 'myimages'; I load the images using src='myimages/picture.jpg'. The 'myimages' folder is in the same folder as my web pages.My domain on the server is villaswfrance.com and I have copied the 'myimages' folder to the server at the same level as the web pages which are directly under the villaswfrance folder. When the app runs it fails when trying to load /myimages/picture.jpg. Does the leading / take me to the web pages or to the villaswfrance folder. If the latter I understand why it fails - if the former I do not understand.
View 5 Replies
View Related
Jul 23, 2005
What i want to do is that this function post data to the server (ASP) and
the server will response with 'OK' My question is how can i send data clientside from Javascript to the server ? (navigate ? with url ?)
and check the returned data in the same function ?
function ShowData(TxtArt)
{
alert(TxtArt + ' : ' + parent.frames.Bottom.TxtUsrName.value + ' - ' +
parent.frames.Bottom.TxtRemarque.value); // testing purpose
// post the data to the server. ex .. myURL.asp?userID=1000&Art=ART1201
// fetch the data from the server. to verify if the 'OK' is recieved ->
the server will response with 'OK'
// if 'ok' -> i will update clientside an frame (ex. contents of
shoppingbasket)
}
Any idea's ?
View 3 Replies
View Related
Mar 30, 2006
I know it's possible to retrieve the IP address of a visitor's computer. However, I need to figure out a way to get the IP address of the server where the files are placed. Here's a description of my issue:
My application, along with some HTML Electronic manuals, are loaded onto a server in an electronic classroom. In order to get to any of these items (manuals or app), the students access the server where an index page is located in the D drive and click a link to get to any of them.
The problem is that these manuals are loaded into the D: drive while my application, because it uses ASP, is saved in the C:inetpubwwwroot folder.
The other issue is that this application will not be placed in just one classroom. Each classroom will have its own server with any number of computers accessing it. Since I don't know how each of the servers will be set up, I need to get the IP address so I can access the wwwroot folder.
What I need to do is figure out, using some non-server-side language, what the IP address or computer name of the server is so that I can access the appropriate folder in the wwwroot folder.
View 2 Replies
View Related
Sep 19, 2005
Is it possible to get the web - server name through Javascript? If yes, how?
My code goes as follows. I get an error after executing this
<html>
<head>
<title>Untitled</title>
<script>
function disp()
{
str1 = location.host();
alert(str1);
}
</script>
</head>
<body>
<cfoutput>
<a href="##" onclick="disp();">Click me</a>
</cfoutput>
<cfabort>
</body>
</html>
View 2 Replies
View Related
Apr 17, 2006
I'v just finished the first web site i wrote which encorporates some javascript. It worked fine on my test server, but as soon as i moved it to the production box, I now get all sorts of errors like :Unterminated string constant when i open the first page, and Object expected when i try to call a javascript function by clicking on a menu item. Is there some sort of configuration that must happen on my production box? The same coding works fine on the one server but not on the other.
View 4 Replies
View Related
Jul 23, 2002
I have a basic js that is used to change some images when the user clicks on a link. it worked fine on my server (IIS 4), but when I upload it and the images to another IIS server the images don't display most of the time. I know this is client side -- so why is the server making a difference??
<script language="javascript" type="text/javascript">
var p = new Array(2);
var t = new Array(2);
p[1] = new Image();
p[1].src = "images/8x8_grid.gif";
t[1] = new Image();
t[1].src = "images/grid.gif";
p[2] = new Image();
p[2].src = "images/3x3_hori.gif";
t[2] = new Image();
t[2].src = "images/hori.gif";
function change_image(whichone) {
thumb.src = t[whichone].src;
pattern.src = p[whichone].src;
maintable.background = pattern.src
}
</script>
Here is how I call change_image...
<A href='javascript:void(0);' onmousedown="change_image(Ƈ');return false"><img src="images/btn_13x13.gif" width=13 height=13 border=0></A>
View 6 Replies
View Related
Jul 23, 2005
However, this piece of Javascript uses some other script which is large.
<script src = "./js/tmp.js".....>
This will work if the file "tmp.js" is local. However this reduces the
portability of my *utility* Javascript
as users have to have that "tmp.js" for every webpage they have (if they
want to use it :D)
I thought of uploading "tmp.js" it to somewhere and change my code to
<script src = http://www.somewhere.com/js/tmp.js ....>
The all the users have to do is copy the piece of code that I wrote
BUT THIS DOES NOT WORK. I TRIED IT.
My questions are:
1. Is there something wrong with server-side Javascript? Or am I missing
something?
2. Is there another way to make my code portable?
View 2 Replies
View Related
Jul 23, 2005
I'm trying to come up with a way within a client-side web page of uploading a couple files to a server-side PHP program without using a <form...>. I don't want to give up the page which happensafter the <form...> executes. Instead, I want to upload the files, then execute a <form...> for
another purpose.
View 6 Replies
View Related
Jul 23, 2005
how to get the server dynamic internet IP from javascript?
View 2 Replies
View Related
Nov 23, 2005
I want to execute server code invoked from inside Javascript code.
I will have my server code in a servlet, callable with a URL, but how
do I invoke the servlet from Javascript without reloading the page and
not opening any window? I mean, I don't want to display the HTML result
of this request.
View 8 Replies
View Related
Feb 2, 2006
I'd like to implement a server socket in java: something linke the following example.
The problem is that the HTML has not the permission to execute instruction
serverSocket = Components.classes["@mozilla.org/network/server-socket;1"].
createInstance(Components.interfaces.nsIServerSock et);
Question:
1 - how do I give it this permisison?
2 - one solution I thought was to put the javascript code in a firefox
extension, to load, so it should have all needed permisison, but,
How can I call a java script function define in an extension
from an html page? - there's some particular syntax? ....
View 2 Replies
View Related
Feb 9, 2006
I have to create a web page to give to clients that is shipped on CD.
The idea is that they would open the page and it would display in their
web browser.
What this will do is to provide a list of most recent changes to the
software we're shipping. The idea is that there would be an un-ordered
list <ul/> with a list of changes (not sure of final desired mark-up).
What we want to do is to get the developers to edit a file that simply
contains a list of changes, putting in minimal markup. This "changes"
file would then be "included" in some way into a parent file that
contains all the branding and other information. We don't want the
developers to have to navigate their way around this parent file
looking for where to edit it.
As this page will be launched in a browser from disk, there won't be
any help provided by a web server, so I'm really stumped as to how to
accomplish this....could it be done with JavaScript at all?
View 2 Replies
View Related