Prevent Accessing .js File From Unwanted Sources?
Mar 22, 2011My swf.js file is getting hacked along with some jquery files, they are injecting cross browser hacking script to .js files.
View 2 RepliesMy swf.js file is getting hacked along with some jquery files, they are injecting cross browser hacking script to .js files.
View 2 RepliesThe loaded file normally, an hrml file, they have no scripting code which can't prevent caching. So how can I do so with this kind of file ?
View 4 Replies View RelatedI'm currently using this method to refer to my JavaScript files:
<script type="text/javascript" src="filename.js"></script>
While doing work for some clients I have made changes to the the JavaScript file referenced above. Because their browser has cached it, they end up getting errors on the page unless they hard refresh and get the new version of the file.
Is there anyway to make the JavaScript file come down fresh if it has been modified since the last download?
I have the following script in my index.php file:
This works fine as long as get_labels.php is located in the same directory as index.php (root dir). If I move the script to a folder called 'includes' and use the following line: script:"includes/get_labels.php?json=true&", it doesn't work.
I've tried different variations:
What am I missing here?
Here's the plugin I'm using:[url]
I want a certain JavaScript script to access an XML file on a different server.
I can use PHP or any other language needed if i have to. but the main file must be in JavaScript.
There's a script on my site that's included like <script src='somePHPfile.php?params... etcIt generates an image with some text in it and a few links.When I click 'view source' it just comes up with the <script> tags and nothing else. In Firefox, if I right click on the actual image and go to this frame > view source, I can see everything it's doing.
View 4 Replies View Relatedim having a bit of a metal block here... i need to know how to verify a password from a txt file... i just need to know how to reference it.
i want it to look something like this:
<script>
var password = prompt("Password?")
if(password == "password from txt file")
{
[Code]....
i know its incredible bad from a security point of view. im using this example for a college essay.
I'm trying to allow a user to select an XML file so that my javascript can parse it and create some pins for a google map.It works fine in Firefox, and by using FireBug I can see that the file is being accessed as expected.IE on the other hand tells me that "'files.0' is null or not an object" on line 68 of address locator. php.
View 1 Replies View RelatedI have an HTML file input control, like this:
Code:
<input type="file" id="FormsFileSelector" name="FormsFileSelector" size="40" maxlength="1000" style="width: 382px; white-space: pre;"
accept="image/gif,image/jpg,image/jpeg/,image/tiff,image/bmp"
>
And it does indeed allow the user to select a file on his computer.
But when I access the value of the control I get an odd value. I do this, in javascript:
Code:
var FileSelector = document.getElementById("FormsFileSelector");
var FileName = FileSelector.value;
And the FileName that I get is "C:/fakepath/MyPicture.jpg"
The actual path is C:/MyDocuments/MyPictures/MyPicture.jpg". But instead it's coming up with "fakepath".
Very weird! How do I get it to return the actual full path to the file on the user's computer?
Does anyone have any excellent online sources for Javascript? I'd prefer to learn online rather than by book.
View 3 Replies View Relatedi am displaying a pdf using an iframe. i am going to be storing links to a lot of pdfs in a database. So i want to be able to loop through and change the iframe src based on a button click.
is there anyway I can do this?
For reference i am writing the code behind in vb .net. The pdf links will be directory links more than likely, I just need to be able to store whether or not a user was able to see a certain pdf, but thats another question for another day
I have 10 images on a blank page, all have the exact same source. I want to change all 10 of their sources with javascript to all be one new source(from source1.jpg to source2.jpg in code below). [code]I know I could run a loop and change all 10 of them individually in the loop, but I can't help but think there is a more efficient way. I was thinking of just making them div tags of all the same class and use the image as the background and then using javascript to change the class property. Basically I am asking what you think is the fastest processing time for the user, while also keeping the code very small.
View 2 Replies View RelatedWhat i'm trying to do is load dinamicaly a js file like this; <script scr="mijs"> This is my code in my html file:
HTML Code:
<html>
<head><title>Untitled Document</title></head>
<body>
<input type="button" onclick="executef()">
</body>
[Code]...
The problem is when I try this alone works, but when i try it inside a window.showModalDialog throws me "object expected" error. I think maybe is time loading problem but i don't know what to do,
I found the tutorial on the W3C website for AJAX and it's great, it gives the following code
Code:
<script type="text/javascript">
function showUser(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
[Code]...
I'm curious to know if it's possible to just use code from within the same file instead of accessing 'getuser.php'? If so, how?
I need my form to submit to two sources, zoho crm and broker office. One is used to create a contact list and the other is an insurance quote engine.How can I use javascript to force my form to submit data to both sites?The bigger problem is they use different names for the same field. In other words one wants to recieve a vaule as first_name and the other wants it as firstName.
View 6 Replies View RelatedI've been trying to get this page working with dynamically loaded iframe sources passed by URL, but I can't seem to get it working.Here's the relavent code:
<script type="text/javascript">
function delineate(str) {
URL = str.indexOf("=") + 1;[code]...
I used the hidden form to change the url to text - advice from another website. I'm sure there are better ways to do it, but I'll explore them as soon as this thing actually works..The types are in a subfolder named types, as shown. The document.write was placed in as a debug helper, and it displays the proper file location of whatever I select with the combo box, but the iframe doesn't change it's src to the selected page! I've tired the last line of the last <script> with several different methods, none of them producing any effect whatsoever.
I have used a javascript inside the bottom of the page, I am not able to get why the unwanted gap is coming, can we resolve this without removing the javascript,
View 2 Replies View RelatedI don't know if it was some kind of "upgrade" in a recent Windows SP but, I now have a problem...When ever I have JavaScript open a new window the URL is displayed in the title bar prior to the title, this is really just an aesthetic problem but seems to be fixed if I set the new window property of location to yes, but I then get an ugly url title bar in my new window. Does anyone know how to disable that "feature" or even what I am talking about. It just annoys me.
View 2 Replies View RelatedI just have one index.html page with NO links NO pics. Just a simple
html page.
Whenever I open that page I want to eliminate few things like:
I don't want scroll bar -> I have a solution <body scroll="no">
I don't want status bar -> ? need solution ?
I don't want toolbar bar -> ? need solution ?
I don't want menu bar -> ? need solution ?
I JUST want the title bar, address bar and the IE window.
In a web based form I am able to make sure that there is text in an input field but I want to restrict the user from using such characters as ~ # & '
How can I modify this JavaScript below to enable this ?
if (document.form1.ProjectTitle.value == ""){
alert("Please complete the Project Title: field")
document.form1.ProjectTitle.focus()
validFlag = false
return validFlag
}
When entering the project title into another system it issues an error when those characters are input - hence the need to delete them from the request.
Instead of searching and replacing unwanted character in strings using cgi/perl, I would like to prevent some characters from ever being typed in text boxes and textfields. Two characters I would like to stop are "|" (pipe symbol) and the "carriage return". I am not even sure how to search and/or replace a carriage return in a string anyway. This may be a JavaScript function, because what I would really like to do is send an alert to tell the user that it is not allowed.
View 2 Replies View RelatedI'm working with 3 Frames on a web-page: (top) Top.html, (left)
Navigation.html, and (right) "Content" which contains varying html pages
based on the (left) Navigation Selection - the problem that I'm having is
that each frame has a (approx.) 2 pixel border around it... I want the
frames to blend seamlessly on the page. I'm not sure How and Where to set
the Border attribute to 0 - is it in the Frameset Definition (which I
thought I took care of with frameborder="0") or in the actual html pages
that populate the Frames? If so, where do I include the attribute? Code:
I'm using mouseenter and mouseleave to call a slideToggle on a dropdown menu. What's bothering me though is if my mouse moves in and out of the menu a few times before the toggle animation is complete and replays the open close a few times before stopping. [URL]... Is there a way to kill the queue so that it doesn't play if the mouse is not over it anymore?
View 2 Replies View RelatedI made up a little test program to grab the mouse X and Y coordinates and plan to use it to allow users to resize a window.
Anyway, the problem I'm having is that in MSIE-8, the mouse down and movement causes text to be selected (which I don't want).
Here's is a screenshot from MSIE:
[URL]
And here is the test program live online: [URL]
Notice that the text in the box is selected... I don't want that to happen.
Of course, it works just fine in Firefox, but not MSIE.
This is probably more of an HTML question than anything else, so my apologies if it's out of place.I'm using a series of spans within a div to act as filters (selectors) to hide/show various divs. When the user clicks on the text within the span, the span toggles a "selected" class, and also triggers a function to hide the associated divs. My problem is that occasionally the area around the text (the entire span, it would seem) gets "selected" when clicked on and turns blue, obscuring the text. Here are two screenshots, one showing the word "lambs" correctly, the other showing the same word with the unwanted blue background. Question: is there any way to make this not happen? Should I be using different elements as the selectors?
View 3 Replies View RelatedMy page is not displaying correctly in Internet Explorer. Its displays properly in all other browsers.
The issue: Internet Explorer
When the page is loaded-- Internet Explorer places DIV tags between the the <LI> elements on my page and in other areas of the controls which have been dynamically added to a placeholder on the child form during page load. The first <UL> element on the list has an ID assigned. The java-script functions correctly on the first <LI> element but does not get to the rest as <DIV> tags have been placed between them breaking up the nodes.
Opera, Safari, Chrome and Firefox load these controls without separating the elements with additional DIV tags. They remain grouped together and display as intended. As they remain in the proper UL container my Java-Script can collapse the list as designed by getting the child elements of the UL.