I'm trying to read a file (will be a firmware update) into a byte array or binary stream or stream of some sort, and then POST it to my server. Any suggestions on opening and reading files from within js? Note, the server is a development server and will not run PHP or CGI scripts for example. I just need to be able to open a file from within a js function.
Also, no ActiveX objects, this needs to be Cross Platform.
I have a photo editing business with many people working in Photoshop. I am currently developing a web based application (joblist) using Javascript and PHP which should allow the photoshop designers to browse and open files/images directly from joblist/web browser into photoshop. The reason I want this instead of browsing folder is that I have a database where I store who worked on which file, when and how long it took. The concept is that, designers will select a file and click on start, as soon as they click on start the original file will open in Photoshop and there will be an entry into database (using PHP).
Once they finish the task they will close the file and click on Finish button. My joblist application will be published in a local server and the file will be open on a local network, so when they save the file it will be saved where the source file is located in (local server). The application should work in both PC and Mac. How to write the code (PHP or Javascript) which can open the file from browser (local server) directly into desktop application e.g. PHotoshop or Illustrator?
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;
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?
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...
I am trying integrate an upload system from YouSendIt.com in to my companies forms. The code they give for integration is basically an iframe with a coded URL set for the source. Their server sends a postback using HTTP Post method but I am not sure how to access the data that is sent back. I do not need to display it but I need to use it for validation purposes in the rest of my form. The Iframe code is as such:
Im writing client-side javascript and I want to do a server side include. There are many server files but only one will be included. These files contain peoples names and phone numbers. This info is packaged as a line of javascript but I can change that packaging if necessary.
The file name to include is being passed as a url parameter: [url]
I know how to parse the url string and stuff the ID number into a javascript variable.
I set <ICODE> foo = "/people/12345.html" </ICODE> and tried <ICODE><!--#include virtual="${foo}" --> </ICODE> but this did not work.
Is there a way to do this with javascript given that the name of the file I wish to include is contained in a variable? If not, what is the usual way of getting the data in the server file into my client-side javascript?
I have a few values and variables that I want to post to a server (without using a SUBMIT button). Is there a way to post data from within javascript - do sockets or connections have to be open for this to work?
I have created an entry form that I display in a modal dialog. I have two buttons on the form: "Add and close", and "Add and allow me to add another". However the only time my modal form will post back to the server is after the form has been closed. I want to do the following: The user opens the form in a modal dialog. The user enters data, and clicks the "Add and allow me to add another" button. The page sends the user input to the server, which adds the input to a database and updates a datagrid on the page. This updated datagrid is visible behind the modal form, so the user can see it happening in the background The form clears all input fields and the user goes again. Any code I write that calls the server (button click events, ajax calls, etc) are ignored, unless the modal form has been closed.
in the above i'm getting the following error: "Firefox doesn't know how to open this address, because the protocol (c) isnt associated with any program"
I have a main.php page with multiple divs. I load whole pages in these divs using AJAX. Some of these pages have forms with submit buttons. The structure of the pages is like so[code]...
So the form is processed by acc_settings.php itself. When the submit button is pressed, the form info is sent to acc_settings but the browser loads up acc_settings.php
What I want is that the form should remain the way it is but the response should be displayed in the same div in main.php and acc_settings.php should not be opened by the browser.
im sure this will be pretty simple, at the moment i have some code which sends text from a textarea to a php file, the php file then stores the data into a database.the javascript post is as follows:
var text = document.getElementById(area).value; http.open('post', 'autosave.php?text='+text);
there is a little bit more to this(just a handle response).My issue is that when the data is passed through javascript newlines and breaks disappear, so when i call the saved data it is presented as one long string with no formatting.i tried the nl2br() function and htmlspecialchars() function in the php file that the javascript passes the data to, this made no difference. I then tried to replace /n with <br /> in the javascript before passing the text variable again this made no differnce.
I was guessing if it was possible, using jQuery, to have a link that, when clicked, opens the relative url and sends to it a post request. I'm trying to do this with the $.post function, but i found the problem that the request is sent, but the page isn't opened.
This is my code: <html> <head> <script type="text/javascript" src="jquery.js"></script>
I have a folder "A" with 10 files, all with .txt extensions in it. I want a java script to open all the 10 files in the folder "A" and change the extensions to .js and save it in a folder "B".
I'm trying to save a PDF file that's built using the jspdf PDF JS files [URL], the example (server side) uses Jaxer to save the file to the hard drive. Can i do this via JQuery instead? PDF Example
I have a website that uses javascript to communicate with the database for the CMS system.
I had a programmer develop a website who refuses to add a logical function to which I am going to have to do myself now.
When you delete an image or file on a page of a website, it does not delete it from the server. It just deletes it from the website and database only and I can see how this will eventually cause problems when files accumilate in the server.
Can someone give me some samples, direction or instructions how I would implement a function so that when the admin deletes the image on a website, it also deletes it from the server itself.
So, I have a dynamic PHP file on my server. I want to make it so browsers can take the code I provide and paste it in an .html, .php, or .asp file, and it'll display across the board.
The file would need to be included, unless someone thinks there's a better way of doing this?
The only example I could think of would be Google Adsense's code? But I'm not sure.
I am uploading text file on html page, that text file lies on desktop and getting updated at every hour. I will keep my html page on server so how will it upload that text file from my desktop ? it is being generated by one cloud sensor .
I am trying to find a way to search to see if there is a specific file located in the current directory on the server. If a folder contains file1.txt or file2.txt and depending on which file is in that folder change a certain javascript variable. What it comes down to is, is there a way to search for specific files on the server and limit that to the current directory/folder.