Can I build a 'real' website on googlepages?
January 2, 2008 1:11 AM   Subscribe

Can I store changing data in a googlepages setup?

I'm trying to build a simple gift registry for my sister, to be hosted on a googlepages account. I was planning to do this in javascript, but I'm out of my depth. The basic requirements are a list of items she would like, and guests can mark an item as bought, but I can't figure out how to store and modify data. As far as I can tell, no changes I make to the javascript variables are kept beyond a single session, and javascript cannot read/write to other files on the server. Is this right?

I've never done web development and am learning javascript as I go, so I may be looking at this the wrong way. Can this be done with javascript, or is there another language I can use within the googlepages framework?

I know there are gift registries available online - this is more for the sake of doing it than the need for a registry.
posted by jacalata to Computers & Internet (5 answers total) 2 users marked this as a favorite
I can't be sure of my negative answer, but you can try linking to a GoogleSpreadsheet, and which you can then set to shareable/editable/public. This means that people editing the spreadsheet will have to have google accounts of their own, though.
posted by drea at 1:20 AM on January 2, 2008

This article covers connecting to a database with javascript, even if its not really a good idea. Can you upload things to google pages?

I don't know what the limitation of googlepages are but you'd probably do much better to get some real hosting and use ajax with php or another serverside language to achieve what you're trying to do.
posted by missmagenta at 2:57 AM on January 2, 2008

Seconding missmagenta, look at other free hosting, then use a server-side language such as PHP or Perl depending on what is supported by the provider. Use the right tool for the job, I don't believe JavaScript was ever intended for this sort of thing since being client-side it needs to be restricted in what it can access to prevent misuse.
posted by hungrysquirrels at 3:35 AM on January 2, 2008

Javascript is a client-side technology. All it "knows" about is the single HTML page it's on. It can't store anything on the server, because when it's running, it isn't on the server at all. (This story changes slightly with AJAX, which functions by allowing JavaScript programs to talk to the server remotely, but which still requires a server-side program to talk to) You can store things with Javascript using cookies, however.

The article missmagenta posted uses a technique that will only work with IE and if you are running a server with particular database components installed.

For a gift registry, you need, as hungrysquirrels so rightly pointed out, some server-side language to do the persistence.
posted by goingonit at 6:12 AM on January 2, 2008

I've taken the advice you all gave me and bought hosting with, so my next step is to learn php. Thanks for the reality check!
posted by jacalata at 1:04 AM on January 10, 2008

« Older I need help with a tagline for my new ecommerce...   |   what to do Newer »
This thread is closed to new comments.