Read and Write to Access using a HTML webpage - html

Im quite new to HTML. What I am trying to do, is create a table in HTML (Which I have done with the standard table tags (table)(/table) etc...
The table has a number of headings, such as Name, Number, 10/10, Percentage, Option
(those aren't the exact titles but you get the idea)
The Name and Number heading is just text that won't change (the same for the text beneath these columns) Which is all fine and dandy, very easy to do.
The part I am struggling with, is part of the table that needs to be able to be edited and saved. In a nutshell, what I want 2 of the columns to do:
When the webpage is loaded up, display information that is stored in MS-Access or MS-Excel (So Automatically READ from file on page loadup)
When the user changes information on the webpage I want it to amend the data in the correct cells on the Access page, so overwrite it, As if you were typing something into Access yourself and clicking the save button.
Is this possible using HTML, Javascript and or PHP? Everything needs to be Clientside. The webpage is built, i'm Using Input type="text" for the text boxes in the table, and I was wondering if using (form) (/form) and some (Script) I could do this. I have searched on the internet and have found some examples where you can read and write to Excel but need ActiveX enabled on IE. It's a work computer and a task I have been asked to complete. There are no administrator privaliges on the system, and I can't enable ActiveX controls in IE so the other method did not work for me. Is there any other way?

You can't archive things like file access, reading and writing to databases's client side. You need to use a server side technology, incidentally, PHP is a server side technology and not client side.
Client side is everything that is run on the users browser, I.E. Chrome, etc. Server side is everything that is run within the web server, before the HTML is sent to the client.
I get the feeling your trying to run before you can walk here. You need to research how web sites work more.

Related

Saving static HTML page generated with ReactJS

Background:
I need to allow users to create web pages for various products, with each page having a standard overall appearance. So basically, I will have a template, and based on the input data I need the HTML page to be generated for each product. The input data will be submitted via a web form, following which the data should be merged with the template to produce the output.
I initially considered using a pure templating approach such as Nunjucks, but moved to ReactJS as I have prior experience with the latter.
Problem:
Once I display the output page (by adding the user input to the template file with placeholders), I am getting the desired output page displayed in the browser. But how can I now obtain the HTML code for this specific page?
When I tried to view the source code of the page, I see the contents of 'public/index.html' stating:
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expectedly, the same happens when I try to save (Save As...) the html page via the browser. I understand why the above happens.
But I cannot find a solution to my requirement. Can anyone tell me how I can download/save the static source code for the output page displayed on the browser.
I have read possible solutions such as installing 'React/Redux Development Extension' etc... but these would not work as a solution for external users (who cannot be expected to install these extensions to use my tool). I need a way to do this on production environment.
p.s. Having read the "background" info of my task, do let me know if you can think of any better ways of approaching this.
Edit note:
My app is currently actually just a single page, that accepts user data via a form and displays the output (in a full screen dialog). I don't wish to have these output pages 'published' on the website, and these are simply to be saved/downloaded for internal use. So simply being able to get the "source code" for the dislayed view/page on the browser and saving this to a file would solve my problem. But I am not sure if there is a way to do this?
Its recommended that you use a well-known site generator such as Gatsby or Next for your static sites since "npx create-react-app my-app" is for single page apps.
(ref: https://reactjs.org/docs/create-a-new-react-app.html#recommended-toolchains)
If I'm understanding correctly, you need to generate a new page link for each user. Each of your users will have their own link (http/https) to share with their users.
For example, a scheduling tool will need each user to create their own "booking page", which is a generated link (could be on your domain --> www.yourdomain.com/bookinguser1).
You'll need user profiles to store each user's custom page, a database, and such. If you're not comfortable, I'll use something like an e-commerce tool that will do it for you.
You can turn on the debugger (f12) and go to "Elements"
Then right-click on the HTML tag and press edit as HTML
And then copy everything (ctrl + a)

Can a HTML form be used offline?

I'm wanting to create a HTML page to be accessed via the kindle browser. I'm wanting to create a puzzle using a form and, when the user solves the puzzle, it will just create a new puzzle. I'm aiming to use cookies to hold the users progress. It can cope with HTML and CSS 3. Can I get a normal web page to redraw itself after the user submits without going back to the server?
Before I get started on the project I just wanted to see whether it was possible doing it this way. Ideally I'd like to put the HTML, CSS and any data into a mobi format but I'm not sure if this is the right place to ask that.
Anyway, thanks for reading.
Mike

Fill in webforms / auto login in AutoHotKey in Crome

I want to open a couple of webpages. Some require User-name password. Others requires to fill in certain files in a webpage.
There are multiple ways for AutoHotKey to fill in web forms, but all are based on "com" which only works with IE
I've googled a while for examples in what fill in webforms and/or login in Crome, but found non so far. Does anyone has an example of an AHK script what fill in fields in a webpage/form
First off I'm going to start by stating that you should have included code, after all this is a code review site rather than a "Hey I need codez" site...
Now to answer your question:
You are correct, COM Objects are the best way to interact with Websites in Windows, it's dead simple and just works (in IE). Since Chrome doesn't support COM, you are left with only working with within the limitations of the browser accepting keystrokes.
Your best shot is to use the Send command to navigate to your target field (I believe sending Tab multiple times when the window is active should work) and than Send the data you wish.
I would also suggest looking into #IfWinActive and BlockInput so that you won't accidentally send an inappropriate key stroke while filling in these forms.
There may be better options for this, such as KeePass or the like. Also it's generally not a good idea to store passwords in plain text, IE within an AHK Script.
Correct, it's not possible to use Com objects with Chrome, however this site has a ton of entry level how-to's to get started with using the com object in IE. This includes how to send specific fields text (without using the send or sendinput commands), and how to triggers onclick events on existing elements (without clicking on them).
This was were I started when I needed to learn how to interact with the com object.
https://autohotkey.com/board/topic/64563-basic-ahk-v11-com-tutorial-for-webpages/

using c++ can you set the output directory to a web page input box?

My brother was asking me if I could make him a program that would ask the user for info (name, address, etc) and then output it on a webpage text box that he uses. The reason for this is he has to write the same info over and over for his job so if he could enter it once and have a program fill the correct fields in that would save him hours every day. I've taken a couple semesters of c++ and I was thinking I could write a GUI program just fine that would get the info needed, my problem is I don't know if it is possible to set the output directory to a html text box. I've never messed around with html coding at all. It would be the same web page every time with the same boxes to fill. Any help would be much appreciated.
No. An input element on a web page is not a file.
An appropriate way to solve this problem would be with a Javascript browser add-on.

Automatically apply tinymce validation to all drupal pages

I happen to have inherited a drupal project where a common html validation error seems to occur on nearly every page. The validation error is so minor and easy, I actually only have to open any page up in the editor and the tinymce wysiwig editor will fix the problem automatically and I only need to save the page. Considering I will be needing to do this 30k+ times to apply it to the entire site, is there any way to have it either applied automatically to all pages or automated? Any and all suggestions welcome to help me speed up the process.
EDIT : Used solution
Since I'm not the most adept at finding a programming solution, I did find an addon for firefox letting me record et loop a series of actions called iMacros. Started it up in 5 different instances of FF and let it running all night and it's half done already. Certainly not the most efficient way of doing things, but may be a solution for those who, like me, aren't as advanced in programming.
Assuming you can loop through the pages somehow i would suggest to build a page where you include the code source into the editor root html element (textarea or whatever). Then after onInit (see the tinymce configuration options for this (setup parameter and onInit) ) you trigger the submit or save button which delivers the page to the server where it gets saved.
The pages textarea might then get filled with the code of the next page and so on...
The important part here is that your serverbackend is able to loop through the different pages and knows which page comes next when receiving the modified/corrected page code.