Page 1 of 2

I got this Idea.

Posted: Tue Jul 18, 2006 11:46 pm
by JellyFish
Let say you go to geocities.com, you sign up and create a little web page. From what I know geocities and many other free web hosting sites do not have mySQL and PHP installed on there servers. So what if you create a file called database.html, and then you store many javascript variables/arrays in that along with some functions that all work to interact with that files variables/array (e.g. data storage) thus creating a database.

Now when ever you create a html page. Just import that script to be able to use the javascript functions that are like php functions that work with the database.html. Some functions change the variables to different values like "UPDATE" query in mysql. And some functions are use to select values from that script (database.html).


What do you think? If, that is, you understand?

Posted: Wed Jul 19, 2006 12:57 am
by daedalus__
I think it isn't worth the effort when there is lots of very cheap, quality hosting.

Posted: Wed Jul 19, 2006 1:04 am
by Benjamin
EasyGoing wrote:What do you think? If, that is, you understand?
Javascript wouldn't work. A web based Java client would.
Daedalus- wrote:I think it isn't worth the effort when there is lots of very cheap, quality hosting.
What if you could sell copies of the script?

Posted: Wed Jul 19, 2006 1:07 am
by Luke
if I'm not mistaken, that's what xml is for dude

Posted: Wed Jul 19, 2006 1:42 am
by JellyFish
Yeah I thought that xml might come in to this subject. I don't know much about JavaScript and xml. :(

I appreciate all your guy's notions. I just came up with the idea and though it might be of interest. My oppinion: there could be a lot of people that need a free database. :D

PS: links to xml and any simular project like this that may exist do post.

Posted: Wed Jul 19, 2006 1:46 am
by Luke

Posted: Wed Jul 19, 2006 1:48 am
by JellyFish
Yeah I thought that xml might come in to this subject. I don't know much about JavaScript and xml. :(
Javascript wouldn't work. A web based Java client would.
Why is that? I'd think JavaScript be easier. It's basically a collection of data stored in variables and arrays a file (database.html). And to change/select the data you need to include it into each script that needs to connect to the data. In a ways it's very simple and amateur. :)


I appreciate all your guy's notions. I just came up with the idea and though it might be of interest. My opinion: there could be a lot of people that need a free database. :D

PS: links to xml and any similar project like this that may exist do post.

Posted: Wed Jul 19, 2006 1:52 am
by Benjamin
I'm no expert at Javascript, but if I understand you correctly, your looking for something that would simulate a PHP/MySQL environment. Remember that Javascript runs in the browser, not server side. The only way you would be able to store data (permanently) is if the script would log into your GeoCities account and update the xml/html database.

I think this is beyond the capabilities of Javascript. Java on the other hand would work, however all your visitors would have to install it if they need the ability to update/modify content. This would also expose you as all your visitors would have the username/password to your account.

Possible = Yes
Practical = No

Posted: Wed Jul 19, 2006 2:16 am
by JellyFish
Makes sence. But just one Q. So what you're saying is that there is no fopen(), fwrite() type functions in JavaScript as there is in php?

Posted: Wed Jul 19, 2006 2:21 am
by Luke
Nope... javascript doesn't have access to your server....

BUT:

You may want to look into something called AJAX (Google it). This is becoming pretty popular... there a number of AJAX threads here as well. Pretty interesting stuff.

Posted: Wed Jul 19, 2006 2:22 am
by Benjamin
Right

Here is a list..

http://wp.netscape.com/eng/mozilla/3.0/ ... ef_a-c.htm

EDIT: Ajax won't work if you don't have server side scripting..

Posted: Wed Jul 19, 2006 2:24 am
by JellyFish
Haha. Your humor tends to paralyze me. I have Googled Ajax, still trying to stamp it into my brain.

Posted: Wed Jul 19, 2006 2:40 am
by Luke
humor? paralyze? what?

Posted: Wed Jul 19, 2006 2:44 am
by JellyFish
Sorry must of took your post wrong. As you may not know it's like 1:00 here and I get a little errie. Going to bed.

Edit: I spelt (sorry -> so)
I gotta go to bed lol night.

Posted: Wed Jul 19, 2006 4:15 am
by Chris Corbyn
EasyGoing wrote:Sorry must of took your post wrong. As you may not know it's like 1:00 here and I get a little errie. Going to bed.

Edit: I spelt (sorry -> so)
I gotta go to bed lol night.
Take that monstrosity out of your signature please! Thank you. :roll: