App Won't Run On Server?

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


ADVERTISEMENT

XMLHttpRequest: Script Works To Request XML File On Server But Not On External Server

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

AJAX :: Cross-domain Calls - Loaded From One Server Into A Website On Another Server

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

AJAX :: Getting Server Date/time With No Server Side Script

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

Resolve Relative Server Links When HTML Source Is Not On Server

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

Saving A File On The Server W/ Js, Ie No Server Code

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

Server To Server Connection (with Clients)?

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

Events - Add Server Control To Custom Webcontrol That Fires Function And A Server Side Function?

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

How To Get Data From Server

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

Determine Name Or IP Of Server

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

Getting The Web Server Name Through Javascript

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

Errors On New Web Server

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

Js Works On One Server, Not Another

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(&#391;');return false"><img src="images/btn_13x13.gif" width=13 height=13 border=0></A>

View 6 Replies View Related

Javascript On The Server Side

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

Communicating To Server .php Without Using <form>

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

Get Server Dynamic Internet IP

Jul 23, 2005

how to get the server dynamic internet IP from javascript?

View 2 Replies View Related

Executing Server Code

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

Javascript And Server Socket

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

Including Files (without A Web Server)

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

Javascript Function In Different Web Server

Feb 16, 2006

I have three different web pages with different domains, and I want to
show some pages of one of the webs in the others.

I use an iframe for this and it shows it good until I have to call a
javascript function in the iframe inside page, I have a permission
denied because the domains of these pages are different.

So, the cuestion is:

Is there some way to call the javascript function of the iframe from
the parent page?

View 2 Replies View Related

Javascript Dies On IIS Server

Sep 29, 2006

The script below loads a calendar page in an iframe and scrolls to
today's date.

It works just dandy on my apache/linux server, but won't do anything
when I use IIS. (Nothing appears on the page at all where the script is
at.)

I'd appreciate any suggestions on how to make this work from the IIS
server. Code:

View 5 Replies View Related

JavaScript On The Server Side?

Nov 3, 2006

I might be turning a corner today and seeing the light. I might still
be confused :)

If JavaScript is the language for the browser then why do servers use
Ruby/Rails, Perl/Catalyst, Python/Turbogears or PHP/Cake? Is it because
the prototype-based language is too different to be chosen except when
necessary. Is it because browser bugs make people think JavaScript is
bad? Is JavaScript not suitable for the server-side for any reason?

I imagine that if server-side programmers started to learn JavaScript
then the client-side code in the world might start to improve.
Translation layer libraries like Prototype.js or Mochikit wouldn't need
to exist. The more I learn about JavaScript the more I like it. It is
difficult to learn however for multiple reasons.

View 5 Replies View Related

Server To Client Script

Nov 23, 2006

How can I get a server value into client event?

Or is there another way around my problem?

I have a ASP page that need to get the server IP
(Request.ServerVariables("LOCAL_ADDR")) to open a new asp page

this is some of my HTML that I want to work. Code:

View 2 Replies View Related

Accessing A Server From Javascript

Jul 20, 2005

I have seen web pages sites, when you drop down a list box, it seems to go
back to the server to retrieve some data without reloading the whole page
(e.g. select make of car and it retrieves a list of models from the server
to populate another list box).

View 1 Replies View Related

View Server Time

Jul 20, 2005

Is it possible to display the current time directly from the server, and not client-side...I have people in different time zones trying to view the same page and the times (based on client) are coming up different.

View 2 Replies View Related

Server Side Scripts With ASP

Jul 20, 2005

Does Javascript work "out of the box with IIS" as an
Active server page? ie. does it have the ability to open files
ect.?

I tried this command and it does not seem to work.

var fileSys;
var txtFile;
fileSys = new ActiveXObject("Scripting.FileSystemObject");
txtFile = fileSys.OpenTextFile("./junk.txt",1,false);

I can't find examples on the web. What would I search for to find out
about objects the Scripting.FileSystemObject?

Background:

I work at a large company with a corperate IT group.
I need to write some server side scripts. The servers they
have are Windows 2000 with IIS installed. If additional
software needs to be installed I will be forced to use VBscript.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved