OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Apr 28, 2024 10:41 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re:HTML Question
PostPosted: Sun Feb 15, 2004 11:32 am 
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.


Top
  
 
 Post subject: Re:HTML Question
PostPosted: Sun Feb 15, 2004 12:27 pm 
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.


Top
  
 
 Post subject: Re:HTML Question
PostPosted: Sun Feb 15, 2004 10:16 pm 
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.


Top
  
 
 Post subject: Re:HTML Question
PostPosted: Mon Feb 16, 2004 10:30 am 
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.


Top
  
 
 Post subject: Re:HTML Question
PostPosted: Mon Feb 16, 2004 10:15 pm 
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. ;)


Top
  
 
 Post subject: Re:HTML Question
PostPosted: Wed Feb 18, 2004 1:07 pm 
No, I mean only the page what appears after submitting the form... Anyway there are plenty of dynamic IP redirecting services.


Top
  
 
 Post subject: Re:HTML Question
PostPosted: Wed Feb 18, 2004 2:50 pm 
Who said anything about a dynamic ip? :P


Top
  
 
 Post subject: Re:HTML Question
PostPosted: Wed Feb 18, 2004 3:08 pm 
You can use those services with static IP too... ::)


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group