View Full Version : Completely new at JavaScript-can it do this?

01-25-2011, 03:12 PM
Hi. I've never used JavaScript, but I want to know if I can use JavaScript to prompt me to type in stuff and then organize it into a text file, complete with HTML tags. For example, suppose I had a template:

The website < a href="#1"> is < green>#2< /green>.

Then it would, ideally, prompt me, "Which website?", paste it into #1, "Safe or dangerous," and paste it into #2. So, if I answered "codingforums.com" and "safe," it should produce a page with text like this:

The website < a href="codingforums.com"> is < green>safe< /green>.

except with unbroken HTML tags.

If this can be done, can you write the code or link to a good tutorial? Thanks in advance.

01-25-2011, 03:22 PM
Not with Javascript alone, no. You can do the prompting, but in order to get the data into a text file, you would have to use a server side language (e.g. PHP).

I'm moving this to the general Javascript forum, since it has nothing to do with frameworks.

01-25-2011, 03:24 PM
Thanks-if I used PHP too, how could I do it? =)