Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to 'edit' a file that's already saved on my server, example:
<link rel="stylesheet" href="css/plugin.scss">
But not only that, I want to edit a certain specific line, in SASS you can define variables in css, basically, I'd like to search inside this file with JAVASCRIPT for the string:
'$increment:
And if it's found, find out what line it is on and replace that whole line with:
'$increment:10;
Basically I want to generate a downloadable file for the user that's custom depending on what settings they choose via a html input field.
If there's a simpler/better explanation I'm all ears :)
The javascript you seem to be referring to (jQuery) is a client-side language so you're not going to be able to do anything on your server with it. A js solution that could do this may be written in nodejs but you may be better served using something like Python, Rails, or even PHP.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a 5K text file of vocabulary words (over 100,000 words, either in xls or txt file). I only want to test if a given string exists in the text file using javascript / jquery.
1) Do I need a library function to do this?
2) Is the size of the file a problem in terms of performance?
Thanks for any help...
Since you haven't tried anything yet or provided code, I'll give you a general layout and place to start.
1) Get your data file via Ajax
2) Use indexOf or match to check for a match. Performance stats here.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I search about protect my javascript code by changing his variable names (complicate the code lisibility like on jQuery).
i find jasob application and i like it because it change maximum variables compared with other system like jscompress
i want to create php code that can transform maximum of varibles and put the compared in database to reverse action, it's seems to be very difficult to do.
Can someone know a existant code like this have proposition to simplify?
protect my javascript code
I don't think that is practically possible. JavaScript is rendered on Client-Side, so no matter you do security, the JS files still going to be downloaded on the client-machine.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm looking for a small and lightweight way to get the screenshot of a website with just the URL. I've heard you can do this with XML/PHP, or even use another service to return the image. However, is there a fast simple way to do this? Preferably in Js? Also, to clarify, my project is going to be dynamically generating these thumbnails.
You can't do this with html/php alone. You need a browser to interpret the content on the page and get a screenshot. Some sort of software. OR use a 3party service
http://www.browserstack.com/screenshots/api looks good, I haven't tried them though
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to use 2 different open source plugins for my website, a gallery and a calendar, both uses JQuery to work.
But when i put both of their javascript together in my website, it clashes and only one will be able to appear.
Is there any ways to specific if that javascript file just works for one DIV only? Or any work around to have both in my website.
Is there any ways to specific if that javascript file just works for one DIV only?
No, there is a single execution environment for a given HTML document. The only way to sandbox JavaScript is to put it in an iframe (even then, there are APIs that allow other documents to be affected)
Or any work around to have both in my website.
Edit the source of the respective scripts to change which elements they affect and to make them use the same version of jQuery and any other libraries they might depend on.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
How can I create an online file editor?
My web application will allow a user to create a new text file, edit it and save it. He can do so with multiple files open in multiple tabs.
If these are only txt files then;
Choose the file store to use. Either store the files in a db or on the file system.
Then all you need to do it load in the file and render it within a textarea and save that back to the file. You may want to keep copies for backup purposes and undo or something.
If you want the file to have nice colors etc then consider a jQuery editor like tinymce.
If however you want to edit any type of doc like word, excel then i think you'll need to use the office object model. but that won't help you with other formats.
As for the tabs, there are heaps of jQuery tab controls out there that will do exactly what you're looking for.
Check out https://bespin.mozillalabs.com/
It is open source.