Page 2 of 2

Re:HTML Question

Posted: Sun Feb 15, 2004 11:32 am
by Tim
Who is hosting your web site? If they support PHP then it is really easy to do what you want. I don't know of any way of saving to the server without any server-side code; in fact, the ability to save to the server from a web browser would be a huge security hole. Regarding email, you could get some success with a mailto:... URL, but that would bring up an email in the users email program.

Re:HTML Question

Posted: Sun Feb 15, 2004 12:27 pm
by Curufir
If all you have is HTML and Javascript then you can't do anything dynamic because there's nothing at the server side to process the information being sent.

Best you could hope for, without the user being forced to send an email, or click on a file dialogue, is to store a very limited amount of information in a cookie (4096 bytes maximum AFAIK). That information could be used on the client side by Javascript to pass information between pages and give the illusion that your site is dynamic, but it would involve writing a lot of extra Javascript and wouldn't allow you to share information between different users.

The solution to your problem is server side scripting. There are many free hosts that offer some kind of scripting support, and even some that offer a small amount of database space.

Re:HTML Question

Posted: Sun Feb 15, 2004 10:16 pm
by AGI1122
Actually if you have ftp access it would be possible if you set up your computer as a server that can parse php.

What you would do is make it so your computer is always online and set to allow access from outside ip's on the server.

Then have the form data sent to a php script on your computer then it parses the data and uses it's ftp functionality to connect the site and update the static data then send the user to the new updated page.

Of course this assumes that you would be willing to turn your computer into a server and that you would be leaving it turned on and connected to the internet at all times. And also that your web site has ftp access.

Other than this method, there is no way to write to a server without server side scripting.

Re:HTML Question

Posted: Mon Feb 16, 2004 10:30 am
by Eero Ränik
Yeah, but if the page needs to be updated, and the address is probably predefined, what happens when two users are trying to post their form in the same time? I think the page could be shown from your home server... If it's the same page for all users, it can be on your site.

Re:HTML Question

Posted: Mon Feb 16, 2004 10:15 pm
by AGI1122
Well you could store the data in a MySQL database each time it's updated. Then have a cron job compare the file on the server with the data in the database, if they are not the same then it needs to update the file on the server.

As for hosting it totally on his own server, it is kind of a pain for outsiders to remember ip addresses since I doubt he is going to buy a domain name for his computer. ;)

Re:HTML Question

Posted: Wed Feb 18, 2004 1:07 pm
by Eero Ränik
No, I mean only the page what appears after submitting the form... Anyway there are plenty of dynamic IP redirecting services.

Re:HTML Question

Posted: Wed Feb 18, 2004 2:50 pm
by AGI1122
Who said anything about a dynamic ip? :P

Re:HTML Question

Posted: Wed Feb 18, 2004 3:08 pm
by Eero Ränik
You can use those services with static IP too... ::)