Zuton
02-04-2004, 10: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?
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?