saving form data in html - html

I only know CSS and HTML. I have to create a web page with an account opening form. My faculty had told me to make it at that so I built it. He asked me not to host it.
Now he is asking me to take everyone response and create a database. I could do that by sending the webpage to everyone and asking them to download the page locally in their system and then open and fill the form. But I do not know how to save that data. If I could get the output in a text file it will be time saving, but even if the page retains the information while my classmates send it back to me it will be great. Can anyone help me on how to save the data?
I know creating a word file would have been much easier but he wanted web page so I am stuck.

You cannot do this with only HTML and CSS. To do this, you would have to code a server-sided page so that you can serve HTML pages to your users, as well as receive data back from them.

Related

What is the correct way to change html dynamically using django

Suppose we have a login page where, in the first stage, we are asked to enter our email. We send this information to the server, which searches whether there is an account with this email, and if there is, our goal is to change the state of the page, to a page where the user is asked to enter the password for this account. If, on the other hand, there is no account with that email, the state of the page changes to one where the user signs up. And let's say that, for the sake of aesthetics, all this happens using the same url.
My question is, what is the correct way to inform the client's page to what stage to go into?
Sending the whole html code is an option, but this seems like it will put too much pressure on the server. Is there a cleaner way, that we can send less information, and still be able to have the same result?
I am new to django and web dev so please explain thoroughly.
For a browser engine submitting a form with email is a new page request and a new rendering of HTML after that. The source of new HTML code is your server with Django, so you should generate a new HTML with a relevant template and send it as a response.
Such user provoked events change a state of your application for a given user session, not a page.
For speed you can use caches for styles, for menus, for HTML snippets (headers and footers).
Also you can make a one-page application, but you must use JavaScript framework for it. Then your JavaScript code executing in client's browser can request concise JSON with necessary information instead of full HTML.
Then your JavaScript framework is responsible for a correct insert new dynamic HTML elements in the current document object model (DOM).

How to display a customized webpage using Google Web App?

I'm trying to write a web app, such that when a user fetch his/her username to the web app, the web app will retrieve the data stored previously in a Google Sheet, and construct a form (webpage) based on the username. What I mean is, each username will have different contents to work with.
The problem is, I just cannot get the page to display; it just shows up for a second, and a warning sign just appears, and this makes my webpage looks so suspicious, while in fact, it isn't.
Here's the part of the code to show up the webpage:
The code above checks if it's the first time the user comes to the page, so a welcome page should be loaded, then he/she can continue from there.
And here's the page after a blink of an eyes:
What I want to ask is, is there a way that I can load a page based on the username given? I don't really know what I am doing wrong. :<
Thank you guys so much in advance.

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

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.

live content from html to html

I'm using UIWebView to display data from my organization data (publicize and legal), however, for instance, I would only want to pull specific data from the html file rather than pulling the whole URL. e.g. I want to pull the "News" section of the html and I want the user to only stay in that page, not enabling them to go into other parts of the website (e.g. home page, contact us) and allowing them to view the PDF article on the HTML file.
I've asked around and read up on DOM and screen scraping, but it seem that the data pulled are stored in a database instead.
Is there any way that I can pull just the HTML "News" section with the PDF URL into my customized HTML file and that it will be updated live (maybe every 30second it will refresh and pull information from the website so that the content and list of PDF are up to date)(e.g. added in 3new article into the main website, my customize HTML file will also refresh and pull information from website and update my article list)
If anyone can point to me a specific method that allow HTML to HTML data passing (live), that will be great and I can go do more research on it. Currently very lost and confuse as it is my first time doing this. Any help/feedback will be very much appreciated :)
EDIT: For example, google map or google search. I don't want to use the whole google webpage, just taking the important thing that i want like the search result or map display.
This will involve quite a lot of learning on your part - you'll have to learn HTML / the DOM / JavaScript and iOS/UIWebVIew.
Lets leave the live refresh part for now, I'll post another answer or edit to that later on.
That's not going to easy either (check out my earlier posting today on background execution issues that will affect you, unless the update is only to take place in the foreground
iOS Run Code Once a Day)
You will have to do something like this. And note that I've never tried this, nor seen posting of people who have on here, but in theory it should work, but there will be a lot of learning as I've said, and lots of trial and error. Its a big task when you're not familiar with these things.
1) Download the html page and load it in a UIWebView, but that UIWebView is hidden so the user's can't see it.
2) When the page has loaded its dom will be accessable.
3) You can use Javascript to access the DOM and look for the parts you want.
How you inject and run the Javascript in UIWebView can be answered in a separate question (this answer will get too long if all the exact details are included).
4) Remove the parts of the dom you are not interested in. Or use use events to make only those parts you are interested in appear, jQuery can probably help here.
5) Display the UIWebView
Alternatively the HTML could be saved to a file and string parsing could be used to search for the bits you are looking for and create a new text html file from it. I think this would get very messy, better to take advantage of the fact that UIWebView will parse the HTML page and create the dom for you.