I made another generator, combining two that I have already made, trying to make them one.
I haven't found any errors on my own, I can't think of what's making it not work.
It's supposed to be the two generators that work on the page, then them both together, but it doesn't work! I changed the name of the form, the name of the welcome3(), the name in the javascript, but I still don't get it! It's probably some stray ", but I can't find it :'(
Please help!
Here's the code:
Code:
<script type="text/javascript">
/***********************************************
* Javascript Generator Script by PGReviews (Physicsguy's Reviews)
* Visit http://www.execulink.com/~kayes/physicsguy/web/ for reviews, guitar tablature, and more!
* This notice must stay intact for legal use
***********************************************/
function welcome3()
{
document.write("<fieldset><b>All Together, Now!</b> <br><hr><br> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" <br> \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> <br> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\"> <br> <head> <br> <title>" + document.forms["alltogethernow"]["nameofsite2"].value + "</title> <br> <meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" /> <br> <meta name=\"author\" content=\"" + document.forms["alltogethernow"]["nameofauthor2"].value + "\" /> <br> <meta name=\"description\" content=\"" + document.forms["alltogethernow"]["descriptionofsite2"].value + "\" /> <br> <meta name=\"keywords\" content=\"" + document.forms["alltogethernow"]["keywords2"].value + "\" /> <br> <link rel=\"stylesheet\" href=\"" + document.forms["alltogethernow"]["stylesheet2"].value + "\" type=\"text/css\" media=\"screen\" /> <br> <link rel=\"shortcut icon\" href=\"http://www.webmaster-talk.com/images/favicon.ico\" type=\"image/x-icon\"> <br> </head> <br /> <body> <br /> <h1>" + document.forms["alltogethernow"]["headertitle2"].value + "</h1> <br /> <p>" + document.forms["alltogethernow"]["contenttext2"].value + "</p> <br /> </body> <br /> </html><br /><hr /></fieldset>");
}
</script>
<form name="alltogethernow" action="generator.htm" onSubmit="welcome3()">
<!--Begin Questions-->
<p>Enter the name of your site:</p>
<input type="text" name="nameofsite2" size="20">
<br />
<p>Enter your name:</p>
<input type="text" name="nameofauthor2" size="20">
<br />
<p>Enter the description of your site:</p>
<input type="text" name="descriptionofsite2" size="80">
<p>Enter keywords for your site (seperate with commas):</p>
<input type="text" name="keywords2" size="80">
<p>Enter the path to your stylesheet (if you have one, if not, don't even use this line, take it out):</p>
<input type="text" name="stylesheet2" size="20">
<p>Enter what you want the title to be:</p>
<input type="text" name="headertitle2" size="20">
<br />
<p>Enter what you want the content text to be:</p>
<input type="text" name="contenttext2" size="80">
<!--End Questions-->
<br /><br />
<input type="button" value="Code!" onClick="welcome3()">
And the page it is at is http://www.execulink.com/~kayes/physicsguy/web/generator.htm
Thanks!!
Last edited by Physicsguy; 05-20-2009 at 05:42 PM..
Reason: Updated code
|