I website I've seen recently uses a clever technique, which I'm still working to figure out. When you go to view an image, a pop-up window opens -- the image is downloaded (non-cached) and then some javascript (presumably) loads a replacement image in its place (it's not displayed) -- when you go to save it, you get the dummy image.
Further, they make some javascript call (presumably, or jquery) to replace the document content of that page, so when you do a View Source, you get something totally different.
How this is actually working, and whether something like that could be cross-browser supported.
I wish to give the user the ability to download a file. The variable "url" is set to the url of a file on the server. I want to give the user the ability to either open it (if known type) or save it.
The following works for documents such as MS Word, but not for images (jpg, etc): window.open(url,'Download');
Any suggestions how to not just create a new window for images, but give the choice whether to save it or view it?
I'm have some images on a site that I want a user to download to their sdcard.i have urls for the images and i have a webpage with a button.when the user clicks the button, i want it to download those images to an sdcard in their pc (hopefully they can select where using a windows open file type box).i think this may be quite difficult due to security with browsers and Iv looked into activex object (but cant get it to save to my filesystem).if this cant be done, perhaps i could do it on the server-side using php and have the user use filezilla to download the images. obviously this is not a very elagant solutio
I am trying to create a way for my users to download some code dynamically from my web page via a file download. Below is the code that i have written so far. It seems to be dying on the iframe but i'm not sure why.
Here is my jquery trigger which is inside my onreadystate function.
I need to have a submit input button automatically start a download when clicked, but also redirect to an additional "information" page. Since I'm not sure if this can simply be solved with HTML or must use some Javascript.
<%@ Language=VBScript EnableSessionState=False %> <%Option Explicit%> <% Response.Buffer = True Response.Expires = 0 'Prevents caching of the content %> <% Dim strScripts Dim ipsp, iFNum Dim fso, file Dim strReferer Dim bRM = False
Dim Scripts(13) Scripts(0) = "Script1.js" ... Scripts(13) = "Script13.js"
strReferer=Request.ServerVariables("HTTP_REFERER") 'compare referer to the address of the page that uses the 'scripts and continue only if matches. This will allow access 'only by your file
strScripts=Request.QueryString("Scripts") set fso = Server.Createobject("Scripting.FileSystemObject")
While Len(strScripts) > 0 ipsp = InStr(1,strScripts,",") If ipsp = 0 Then iFNum=CInt(strScripts) strScripts="" Else iFNum=CInt(Left(strScripts,ipsp-1)) strScripts = Right(strScripts, Len(strScripts) - ipsp) End If set file = fso.opentextfile(Server.MapPath(Scripts(iFNum)), 1) Response.Write(file.ReadAll) file.close set file = nothing
Wend
set fso = nothing
%>
Hope this will extinguish some of the code protection debates. If you see holes in the suggested approach let me know. It still does not protect from net traffic sniffers ....
I made a form, but I don't want just anyone to be able to use it. So I was wondering if it was possible for the page to check if they were logged into my forum.
I have designed a template for a script in html and planning to sell it, but i am too concerned with piracy because i need money urgently for my further studies and piracy will ruin it,
So is there anyway you can suggest from protecting it?
The 1 way i have in mind is the first time the template loads it send the domain name using the template to my site and automatically placing a php file in another directory so that if i find the user malicious (using the pirated copy) i can disable the template and request him to buy a legitimate copy.
And can that javascript be divided into parts? like 1 part in header another in body and so on, so that it is hard to find the code.
I know there is no 100% full proof way of securing but having done little from our side can also help us avoid few pirate's .
If you click on 'Tide' you can see the password prompt appears. But the problem I am having is that even if you press cancel or do the wrong password a few times it still open up the shadow box.
This is the script for the password protection
This is an example of how a working (non shadowbox) version works successfully.
I am trying to prevent an email address from being spammed as spammers use spidering tools to scan the internet for exposed email addresses in plain text.
I am using a technique and I'm not sure whether it will deter spam bots.
I have an external Javascript file with the following variables:
var usr = "mark"; var at = "@"; var domain = "fullmarksdrivingschool.co.uk";
[Code].....
When I open the web page in a browser the email address displays correctly but does this technique work to prevent spammers from indexing the email address?
I have a page /download.php.basically on entry this page displays a browser download dialog box for a file.I was wondering if there is a way to use .load() to get the same download dialog box on another page.I tried the code below but it does not work/ what jquery function I can use to get this working
I'm working on a project that requires files to be password protected on a UNIX based site. The people that own the web site want to be able to change the password every so often. Unfortunately, I have restricted access only to FTP so I really can't log in to any kind of Administrative Console or Admin Panel and see if there are folders that can be password protected and then have passwords changed on them. The people I'm contracted to work on the site for aren't the most computer savvy people though....so..my question is:
Is there a user friendly way of password protecting a folder on a UNIX based site?
I am trying to get started using JQuery, but I find I can't even get to lesson #1. When I go to jquery.com and click to download the latest version (or any version) it doesn't "download" anything. It opens the file as a webpage in my browser and I see all the JQuery in one big string. Why won't the file just download? Is it the browser I am using? Is it my Mac?
Does anybody have a Download Dialog written in JavaScripts? This is for a website. I've seen it done before.... where you click on what you want and the dialog comes up asking you if you want to save it. From what I can tell, the name of the file is passed as a parameter of the JavaScript.
I'm using ASP.NET and setting window.location.href in my web page to output an audio file that the user is prompted to download. I would like to provide a link so that the user can download the audio file and an XML file one after the other. I've been experimenting with opening a new window, but there must be a cleaner way of doing this.
I tried redirecting in the onLoad event of the form but doesn't work. I suppose it redirects as soon as the activeX is loaded and not when it has finished its download.
The problem with the above solution is the back/forward buttons and all the other browser options. Because of this, I am trying to get the following solution to work:
function popUp(url) { window.open(url, "PDF", "width=500,height=500,status=no,toolbar=no,menubar= no"); }
When I use this implementation, I get a window asking if I'm sure I want to download the file (which I do not get from the first implemenation). I click yes, and it says it was unable to download the file. Just as an experiment, I have taken the url that ends up in the location bar from the working method and pasted it in a new browser window. That gives me the same error as the popup function method.
How to download a pdf link? suppose we have a pdf url [URL] now i have to create a button on click of which it downloads that pdf. i have tried window.open() method in javascript but it opens it in another window. is there a way to download a pdf link using javascript or ajax.
I need to download - randon size - parts of a file, not the whole file. Says: I have the zip file test.zip, it is 10 mega bytes long. But I don't want the 10 mega today. Today I want 5 mega bytes. Tomorrow I could want more 3 mega bytes of the file, but it is not sure, could be 4 mega bytes. I need to part the zip file in chunks at request. No CGI, no asp, no php. Only client side scripts.
I am curious to know if any research has been conducted regarding the efficiency of having a single (large) .js file downloaded for a webpage compared to several smaller .js files.
For example in my web pages I often include the scripting code <script language="javascript" type="text/javascript" src="ascript.js"></script>
which contains all the code for a given function, i.e. the main function and any subsidiary functions.
I have developed a few library functions (leftString, rightString, etc.) and these can be invoked by functions in other .js files, so I would have something like":
I'm just wondering if there is any difference in download time when the HTML has to download these separate .js files rather than a single one.
Even though the use of broadband is spreading I still like to keep my web pages as efficient as possible, not everyone has broadband after all, some still use dial-up connections.