I have spent a considerable amount of time googling this and was hoping someone on here had a reference or starting point I could expound upon.
I am looking for a javascript/jquery AutoComplete script which has the source being the file Names inside of a directory. I welcome any suggestions... thanks!
If worse comes to worse, I can just use an AutoComplete script (jqueryui or typahead.js) which has a source file for the results, but then I would have to code a separate function to automatically write to that file each time a new file is put into the directory or is deleted from it, and I am just trying to avoid that should something already exists.
EDIT server side scripting is unfortunately not an option for me. This is being run through an HTML Applications (HTA) file, so fortunately I do have additional freedoms than a typical web application.
I found an article for autocomplete textbox using jsp, jquery has been used but the code is written in such a way the data is retrieved from database and it comes as a suggestion when user types a letter or part of word.
if you are looking for it, you can click it here
Related
I'm working on a project for my employer that is off-job-description for me. I am not in my department's IT/WebDev departments. That being said, my department is trying to streamline a process that is horribly done right now. Here's what I'm trying to do..
I want a form that can be submitted on a local computer (no PHP library at this time - ticket opened with IT for months now). It will then be used to populate a calendar (which I have no issue programming and filling automatically with PHP normally, but like I said - no library).
Basically - I need to be able to save the input data locally on a SharePoint folder and be able to "grab" that data when the site is loaded.
Again, I have no problem with the display/structure parts - I just need to know a good way to save/load the data (long term) until my IT gets its... stuff... together and get's me a php library and SQL Database.
I'm not looking for any type of script help or anything. I can learn what I need. I just need ideas of what type of function or something I can use. If you have a website with some tutorials or at least documentation for it, I'm happy to read up myself.
Browsers cannot access your local filesystem and are heavily sandboxed to protect you and your data from nefarious websites (even if you have written them).
As such, your only option of writing data to a Sharepoint folder is to leverage a server of some kind. This can be created locally on your own PC, or on a spare one for the time being.
You might to need to contact your IT admin, so that they can grant you access to your Sharepoint, so that your PHP code can read/write to your Sharepoint folder(s).
Good luck!
I've searched to the best of my capabilities, haven't found an answer.
I'm trying to save pages like this:
http://www.folkbibeln.it/?book=1joh&chapter=1&verse=1
To separate html pages, and keeping the format. I could take each page, copy, paste in a word processing software and save as html, but it would take hours upon hours. I'm thinking there might be some code I could use to automate it? I just can't figure it out, since it's not acting like a straight up html site.
Python is the language I'm using generally.
As an brute-force approach you could use a Headless Browser to load each page for you and save it to a file.
But as mplungjan already mentioned, all texts are in js-files.
You could save these files to your disk, then take the script that builds the html-page and write a little nodejs script that builds all the html-files for you. (Take the original script as a template.)
But nodejs ain't python
Depending on what you're trying to do with the texts, it ain't hard to convert these js-files into JSON and parse it, or directly into a python datastructure that you can import and process in some script of your choice.
Edit:
On a second Look, I just saw this: http://www.folkbibeln.it/chapters/1joh1.html
There seem to be the files you want as plain html, you just have to download them.
All the text is in JS files. You load the URL you gave us. Click ctrl-s and choose Web page complete. Then you will have ALL the text in the folder 1 Joh 1 – Svenska Folkbibeln_files You cannot save as formatted text unless you render the JS in the js files
Hey so i started using Electron becouse of HTML/CSS/JS possibilites.
I have expirience mostly with PHP and some little with JS.
Was searching how to hide files of Electron (becouse .asar file can be unpacked) and its just stupid to put my MySQL server info in .js file and let users see that info..
Is there any way to hide atleast 1 .js file where i would put all necessery stuff like mysql connection and mysql managing?
I googled a lot about that some people say that Node.JS can to that but i cant find anywhere how to exacly do it?
Tried to switch to CEFSharp but cant realise how to interact between C# and Webpage (used webserver for template and php stuff but like how to tell C# that variable of A is A and use that C# variable for something)..
Hope somebody will help me, maybe its dumb question for some expirienced developers but i mostly work in PHP and i wanna learn new stuff..
Thanks!
Long story in short - no. In deep down, any code you ship in client to users should be considered to be revealed, just matter of how hard will it be. Instead of shipping important credential and obfuscate to not able to read it, application should be designed to be safe even if user reads whole code in client.
I'm not really any sort of expert on Electron. I'll assume that you will either create a login or a config file. In the first case you can use the database to determine if access is allowed. If you don't want to setup a login script then you can use a config.json file that is not part of the build file. There are a few node packages you can use - I believe one is "electron-storage" to help with the access to the database. Hope this helps.
Johnf
I have written a script in PHP that connects to my FTP server and downloads the latest backup of all the websites I have created.
I have written this script in PHP (using ftp_get and all those lovely functions!), but I have also created a nice looking dashboard in HTML, which uses AJAX to not only execute the PHP code but to output all the "echo"'s into a textarea so I know which ones were successfully downloaded and which ones failed.
My problem is that I am not the only employee, there are quite a few of us who could execute this script, so on the dashboard I want there to be a way of choosing where these backsup are saved without having to edit a hardcoded destination in the PHP. At the moment, it's hardcoded to save to my desktop, but if someone else were to use it on their computer, it won't work.
I have tried searching for this, but no one has asked exactly the question I needed answering.
If the answers could be using HTML, JavaScript/jQuery or PHP, that would be handy.
Thank you in advance.
------------EDIT------------
Not sure people are understanding my problem, so I will try and explain it differently :)
I have a backup tool that will connect to an FTP server, go through each project folder and download the latest backup of that site. In total, there are at least 20 files to be downloaded.
Multiple people will be using this tool, depending who is around to backup the files.
Bob might want to save it directly to his desktop: C:/Users/Bob/Desktop.
Barbara might want to save it in C:/Users/Barbara/Backup Folder/2017/
Jimmy wants to save it in C:/Users/Jimmy/Projects/Project_name/Backup-01-01-2017
And I might want to save it onto an external HDD.
I want the tool to have a function that will allow the user to specify a location on their HDD where these files will all be saved.
I hope this is clearer.
Many thanks.
I am not sure if what I am asking is actually possible but let me try to explain. I am trying to allow users to link to a local file, from an internal web application. Instead of having to hard code every link, I was wondering if it was possible to manipulate a HTML file input so that the user could browse to the file they wanted to link to. I do not wish for the files to actually be uploaded anywhere since they are already on a local drive, it seems silly to duplicate them, and down the line this would lead to multiple duplications (the PDF's are per product, and the same product will be referenced on multiple occasions).
I am aware after some research that due to security reasons you are not able to obtain the file path of a selected file unless perhaps by the use of a temporary URL. See here. Unfortunately this seems to be a very temperamental solution and I can't seem to wrap my head around how it works.