Javascript Server.mappath Equivalent
Apr 12, 2007
I am using a location in my javascript: '../../myfolder/myfile.asp'
I want to make the script reusable by pages in different folders. The 'myfolder' is in the root of my site. How can I target this from any other folder such as the vbscript server.mappath('myfolder/myfile.asp')?
View 2 Replies
ADVERTISEMENT
Jul 23, 2005
I want to do some Win32 application automation from JavaScript. Is it
possible? Failing that, is there a way to execute an application from
JavaScript?
View 2 Replies
View Related
Jul 20, 2005
Does anyone know a way of passing parameters into a Javascript script 'from
outside' via additions to the URL -- similar to (or even the same as!) the
idea of CGI parameters?
View 7 Replies
View Related
Aug 14, 2005
Whats the Javascript equivalent for PHP's file_get_contents ?
<script type="text/javascript">
document.open("http://anotherpage.php"); // I know this is not the way because this opens a new page
</script>
Any way without using frames ?
View 3 Replies
View Related
Jul 31, 2007
I have to do drag and drop.Following one is runing well in IE But not in FireFox. Code:
View 1 Replies
View Related
Mar 28, 2007
I'm looking to return DATE ONLY for yesterday's date. No seconds,
milliseconds. Formatted either yyyy/mm/dd or mm/dd/yyyy. VB does it so
easily Date()-1 will return 03/27/2007 if today is 03/28/2007. Why so
many hoops for javascript? Any ideas?
View 21 Replies
View Related
Dec 4, 2002
What is the best way to get just the script name that is running without the path and parameter info? This would be the JavaScript equivalent to the PHP command:
basename ($PHP_SELF);
View 5 Replies
View Related
Dec 14, 2005
In PHP, there is a require_once() function which includes a file only
if it is not already included. Is there an equivalent function in
Javascript (one that checks if a .js file has been included)? If not a
straight-up function, is there some other way to check if a javascript
file has been included already?
View 3 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
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
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 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
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
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
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
Jan 18, 2007
I was handed a project that, when launched, had some ajax problems--specifically, "Error: uncaught exception: Permission denied to call method XMLHttpRequest.open." That's easy enough to fix--found the call in the .js file that was referencing the development server instead of the live server, and I am aware of Javascript's same-origin policy, which makes good clean sense. Change that call, problem solved.
Unfortunately, it's not solved. I can change the reference from
var url='http://www.devserver.com/function.php?id='+id;
to
var url='http://www.liveserver.org/function.php?id='+id;
but that doesn't solve the issue of if someone comes to the page without the 'www' or to the other domain, whose TLD is a .com instead of .org.
In PHP, I'd simply write the function to dynamically generate the url string, using $_SERVER variables rather than hardcoding the url. But I'm no javascript guy. Any help would be appreciated.
I'd rather not have to put a php redirect in every page to make sure the url is what I want it to be. I'd much rather learn something new about Javascript.
View 3 Replies
View Related
Jul 23, 2005
I have a number of server-side Javascript applications running on an
old Netscape Enterprise server. I want to move them to Apache. Is
there a way to do this without extensive recoding ? My code contains
a lot of Oracle and SQL Server database interaction.
View 2 Replies
View Related
Jul 23, 2005
Is it possible to get the Server IP Address from Javascript
ie., when the user types "http://10.0.0.10/main.htm" in the web
browser, i need to retrive the value of the IP Address(10.0.0.10) from
my client side javascript.
View 2 Replies
View Related
Nov 23, 2005
I want to populate my client's webpage (Remote Server) automatically
through my Server and Database by having him just paste a javascript
on his webpage.
I have read up about Microsoft Remote Scripting but the documentation
states the following : "The server which you make remote scripting
calls must be the same server from which you requested the client page
containing the requests."
In my case , the client and server pages are on two seperate servers
which means that I cannot use MS Remote Scripting.Is there an alternate
approach in any scripting language ???
Any suggestions, tutorials , websites , code snippets will be
appreciated while i continue to research on this...
View 4 Replies
View Related
Aug 2, 2006
Ref. http://support.microsoft.com/kb/834489/en-us
Now that http://username:password@site.com no longer is an accepted
syntax in IE, I suddenly have a case in a project I'm working on. The easiest(?)
solution would now be that there was some Javascript function that
could pass the username and password or in som other way automate the login
process on a given site.
Thing is I have a server-generated HTML page that I want to make the
client redirect to a password protected site. (IIS Windows authentication).
Before: location.href='http://name:pwd@site.com'
Now: ?
View 3 Replies
View Related
Jan 20, 2007
I'd like to adapt some Greasemonkey scripts that I've written and have
them applied to html files on the server side before the files are sent
to users. I'm only looking at adapting scripts that make static
changes to pages. For instance, consider a script that removes from
the DOM any img that has "ad" in its src.
I'm sure there are better ways to do this and I'm not even necessarily
looking for an extremely efficient solution. Mostly, I just want to
know if there's an existing product that could do this or with
reasonable effort could be made to do this.
View 5 Replies
View Related
Aug 29, 2007
I want control a hardware device using a Web browser.
I created a page which has a form containing all necessary INPUTs.
By clicking a button, all current settings are sent to the server side
(using POST or GET) so that the server can interact with the hardware,
which is under the server's control.
Now, in some cases, I want to update the INPUT (w/ readonly) with the
data from the hardware, such as a status value.
Most primitive approach is creating a new page with new value to the
INPUT, where I want to show the value.
But that is not quite efficient as the page appearance won't change
except the contents of the INPUT.
As Javascript can make any change to the HTML page (at client's side)
that is currently being displayed, it is more straight forward if the
server can send a set of Javascript commands to the web server so that
it can just update the display contents rather than refreshing
everything.
I thought such scheme was already available, but so far, I don't see
anything usable.
The Web server is not a commercial one but a custom Web server
(written in Python) so that I want to keep the scheme as simple as
possible. I checked AJAX but I'm not sure I can use AJAX in my
application.
View 10 Replies
View Related
Oct 13, 2005
I am a .Net Developer. I want to know to write javascript for serverside controles.And where it is placed for sever sidr controls. Please tell me if any one know this.
View 1 Replies
View Related
Jun 8, 2005
How portable is server side javascript? Does server side javascript works the same across different browsers and operating system? What I should do to ensure it is more portable?
View 1 Replies
View Related
Jul 23, 2005
I have recently set up a server certificate on a web site.
Under certain conditions I need to change the color of a html span
element.
I do this using the following javascript function called from the
onreset attribute of the form element.
function removeWarningMsg()
{
if (isIE) {
document.all.Warning.style.color = "<%=BACKGROUND_COLOUR%>";
}
return true;
}
This was working perfectly fine until I applied the server certificate
to the website. Now when executing this line of code the following error occurs:
Error: 'document.all.warning.style' is null or not an object.
View 2 Replies
View Related
Jan 23, 2007
I'm writing a program on Zimki, which I think uses SpiderMonkey as a server side Javascript engine.
My idea is to have an html file that someone else created, and look inside for cells in a table that have special known names, like name, description, etc. Then I want to figure out the <tr<tr/pair that encloses all of those special tags, and use that as a template to generate a bigger table from another datasource.
So, I'm wondering how I actually open a file and then parse it as html so I can poke around the DOM, all from the server side without involving a browser client.
View 2 Replies
View Related