External Js File Protection ...
Mar 8, 2006
I was wondering if I could not put a little protection on my .js files by adding a couple of lines to start the file Something like a try catch I thinking of try top.location or try document.body just to avoid beeing able to put path to file directly in address bar ... is that fesable ?
View 11 Replies
ADVERTISEMENT
Jul 16, 2010
I'm writing a script and I've encountered a problem.. I have a txt file with many words, each word in a different line. For example: the file words.txt contains:
word1
word2
word3
word4
word5
I need to load the content of the file into a variable in my script. I prefer that all the words will be in the same variable with line breaks, but if you'll figure out a way to put it in an array, it's ok too. I really don't know how to do it, and I tried to google but didn't understand.. By the way, I don't want to change the txt file to js file, I need it to remain txt..
View 8 Replies
View Related
Sep 26, 2007
I got an [object error] from IE 7.0.5730.11 when moving the <script
src="..." type="text/javascript" /tag from the <headpart to the
<bodysection of a HTML file.
Is not possibile to include Javascript code via <script src="..."
type="text/javascript" /from the <bodysection, instead from the
<headone? If yes, anyone has any idea of which the problem could be?
If not, how can I programmatically include a javascript external file
inside the <bodypart of a HTML file, for example, using Javascript
to some particular native functions?
View 1 Replies
View Related
Oct 15, 2011
I have a external file for example abc.js ,in this abc.js file no functions ,it contains some scripting,i want to call the scripting file though html I use the code
<script type="text/javascript src="abc.js"></script>
in the header file but i want it in a href tag
View 1 Replies
View Related
Jul 16, 2010
I'm writing a script and I've encountered a problem.. I have a txt file with many words, each word in a different line. For example: the file words.txt contains:
word1
word2
word3
word4
word5
I need to load the content of the file into a variable in my script. I prefer that all the words will be in the same variable with line breaks, but if you'll figure out a way to put it in an array, it's ok too. I really don't know how to do it, and I tried to google but didn't understand.. By the way, I don't want to change the txt file to js file, I need it to remain txt..
View 5 Replies
View Related
Feb 26, 2010
Is it possible to use javascript to write information to a log file that's on an external site? What I want to do is have a person put their name and birthday into a form on my site, and then output that information to a partnering site's log file which would be something like www.whatever.com/whatever.file Is this possible? what file type can javascript write to? I put .file because I am unsure.
View 6 Replies
View Related
Oct 14, 2005
I have the following HTML file:
---
<html>
<head>
<title>Test</title>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
Hi There. <a href="javascript:doit()">Click Me</a>
</body>
</html>
---
The following js file:
--
function doit() {
alert("I did it");
}
--
Running htm file locally (double click) gives me security warning (XP
SP 2) but if I then select "allow script to run" everything works fine.
But when I serve page through IIS (localhost) I get a syntax error line
4 char 4. Of course there is no line 4 in the js file.
This HAS to be something simple I am missing but I have tried:
- with and without language attribute in script tag
- relative and absolute paths for the js file
- with and without Mime type for js set in IIS
Only remaining thing I guess it could be is file permissions but
everything has execute on it as far as I can see.
View 7 Replies
View Related
Feb 16, 2006
Is there any way to protect the browser's cookie, prevent users from
modifying it?
Seems some browsers, such as Opera, provides a very easy to use
interface for user to modify the cookie value.
View 1 Replies
View Related
Jul 15, 2006
Can any one hlep me in disabling address bar in IE7.0 using javascript. In IE 6.0 if you give locaiton = no, it will disable the address bar.It was not working with IE 7.0.
View 24 Replies
View Related
Apr 22, 2010
I recently paste the ip ban java script found on this link [url] on my network.
But, the problem is that the script is banning everybody including me.
I was able to unban myself after much search on google & gain access to my network. I re-edited the code by including and specifying the ip of the spammer's in the indicated field. But, after implementing the code on my network, i keep recieving this message " your ip has been ban" and i will be redirected to [url]
How to go about this or is there programming mistake with the script?
View 4 Replies
View Related
Nov 4, 2011
I'm having a bit of trouble understanding something that seems relatively simple. When I make changes to CSS in JavaScript using '.style' I'm changing the attribute values of inline CSS. Can I use JavaScript to change the attribute values of rules in an external CSS file? I have no CSS in my html and would like to know if I can grab the values of attributes in an external CSS file using JavaScript.
View 2 Replies
View Related
Feb 1, 2010
Is this the best way to do it?
Another question:say i click on Eye Protection, the ul drops down, but when i click on Eye Protection again the list must disappear again.
<script src="jQuery.js"></script>
<script>
$(document).ready(function(){[code]....
View 1 Replies
View Related
Jul 23, 2005
I have the following directory structure
index.jsp
a.js
b.js
|
|--/templates
|
|--/blah.jsp
Now blah .jsp is included INSIDE index.jsp.
In blah.jsp I have a button that calls a function inside b.js.
In index.jsp I have following code inside head tags:
<script src="a.js"></script>
<script src="b.js"></script>
and I figured since blah.jsp is included inside index.jsp, I should be
able to access the javascript methods with ease. But its not happening
that way. I get an error (object expected in the line that has button in
it). BTW, its not a problem in my JS or JSP code, because if I put the
js file's contents inside blah.jsp, then it works like a charm!
So what am I doing wrong?
I also tried moving my script import statements inside blah.jsp as:
<script src="../../a.js"></script>
<script src="../../b.js"></script>
But this doesn't seem to work either?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
View 3 Replies
View Related
Jul 23, 2005
The standard Dreamweaver script for repairing the Netscape resizing bug
seems to be a waste of bandwidth. Is there a reason no one moves this
script to an external file ? Wouldn't the following work? Code:
View 4 Replies
View Related
Nov 28, 2009
I am currently working on displaying KML-values of ElementTags within my KML File. I already integrated the KML file as an overlay to my Google Map. But how am I able to parse the GGeoXml-object or how am I able to parse external [URL].. instead of just "polygons.kml") XML-files?
At the moment my code for loading the geoxml file looks like this:
[Code]...
View 2 Replies
View Related
Apr 20, 2010
I'm trying to call a external .js file that contains a function from a webpage, but haven't been able to discover how to reference the function.According to the book Beginning JavaScript 4th Edn, this should work - why isn't it?
View 10 Replies
View Related
Mar 16, 2011
relatively new coder here definitely new to js and I can't figure out how to get this script linked into an external file every time I try nothing shows up.
<html>
<head>
<script language="JavaScript1.1">
<!--
var slideimages=new Array()
var slidelinks=new Array()
[Code]...
do i need to break this up into 2 files or something I can't get it to work
View 2 Replies
View Related
Nov 15, 2011
I have a scroller on my pages that basically reads a text file and displays.. The problem that I am having is it doesn't update until I reload the page(even though the .txt file updates about every 3 minutes).. I would like it to update when the file has been changed.. Here is my page.
[Code]...
View 3 Replies
View Related
Apr 24, 2007
I found this javascript for a scrolling box to place on my web page. The information which scrolls in the scrolling box is embedded in the web page. I want to have it reference an external file. How do I do this?
The script set a variable called mymessage='Your message goes here'.
If I created a text file which is in the same folder as the web page, how can I get the text to be pulled from that file? Say for instance my file is at http://pacs/myTextFile.txt.
View 1 Replies
View Related
Mar 19, 2009
How can I print external PDF file through Javascript.
View 1 Replies
View Related
May 20, 2009
i have a .js file .can i use php code in external js file.
if yes how we can.
View 1 Replies
View Related
Jan 31, 2004
Is this the correct syntax to apply an external js file:
<script type="text/javascript" language="JavaScript" src="luckydraw/luck.js">
</script>
I am trying to call a pop-up.
When the javascript is placed into the HTML directly, seems ok and can call the pop-up. But when I move the Javascript outside, seem can't.
View 3 Replies
View Related
Aug 30, 2004
My external file linking is not working, following is the code. the .js file is in the same folder as my html page. Been working on it for over 2hours wihtout any success.
It says ['Circle' is undefined]
<html>
<head>
<title>Test</title>
</head>
<script LANGUAGE="Javascript1.2" type="JavaScript1.2" src="circle.js"></script>
<script language="javascript1.2">
<!--
function runTest() {
// alert('entered1');
var c = new Circle(1.0);
// var c=[new Circle(1.0), new Circle(2.0)];
}
// -->
</script>
<body
hi
</body>
</html>
circus.js
function Circle(radius)
{
this.r=radius;
}
View 2 Replies
View Related
Jun 18, 2007
I have an existing javascript menu where the user selects a meaning from a drop down box and a list of products with that meaning appear in a search results page.
I had the whole javascript pasted into one of the columns where I wanted the 'search by meaning' box to appear and it worked fine, however when I tried to validate the HTML (4.01 strict) it popped up errors left and right because it was interpreting the script as HTML.
I don't know how to write js or work arounds, so I removed the whole script from the page and saved it in a .js file, but I am doing something wrong because I cannot get the javascript to appear at all, nevermind getting it to appear in the column I want it to. Code:
View 4 Replies
View Related
Sep 10, 2010
is there any way html page to read from an external file?I need to have an text, excel or another easy to use file to edit with information and the Html to read it's content.
View 2 Replies
View Related
May 15, 2011
I have some javascript code for a guage, i want the value for the guage to come from an external file, ie a xls, csv or txt file. Preferably a xls file. The code currently looks like this: demoGauge3.setValue(200) I was thinking of using a test.xls file where cell A1 has the only value in it. I want to read a file and use the number value in that file to drive the setvalue point.
View 3 Replies
View Related