...

View Full Version : User submitting into a javascript file



Zuton
02-04-2004, 11:44 PM
Is it possible for the user to input text into a form on a site and for that text to be put into a javascript "quotes" file which will then display that text on a page?

So, for instance, you've got this .js file uploaded

--------

var quotes=new Array()

quotes[0]='Text1'

quotes[1]='Text2'

var whichquote=Math.floor(Math.random()*(quotes.length))
document.write(quotes[whichquote])

----------

Could a user input Text3 into a form and it appears in the .js file as -

quotes[2]='Text3'

----------

and so on?

Antoniohawk
02-05-2004, 03:00 AM
Can't be done with javascript as far as I know. You'll need to use a serverside language, such as php or asp.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum