Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Why Won't This Work!!??
Old 05-20-2009, 05:34 PM Why Won't This Work!!??
Physicsguy's Avatar
404 - Title not found

Latest Blog Post:
Challenges
Posts: 824
Name: Scott
Location: Ontario
Trades: 0
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>  &lt;!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"  <br>  \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"&gt;  <br>  &lt;html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\"&gt;  <br>  &lt;head&gt;  <br>  &lt;title&gt;" + document.forms["alltogethernow"]["nameofsite2"].value + "&lt;/title&gt;  <br>  &lt;meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" /&gt;  <br>  &lt;meta name=\"author\" content=\"" + document.forms["alltogethernow"]["nameofauthor2"].value + "\" /&gt;  <br>  &lt;meta name=\"description\" content=\"" + document.forms["alltogethernow"]["descriptionofsite2"].value + "\" /&gt;  <br>  &lt;meta name=\"keywords\" content=\"" + document.forms["alltogethernow"]["keywords2"].value + "\" /&gt;  <br>  &lt;link rel=\"stylesheet\" href=\"" + document.forms["alltogethernow"]["stylesheet2"].value + "\" type=\"text/css\" media=\"screen\" /&gt;  <br>  &lt;link rel=\"shortcut icon\" href=\"http://www.webmaster-talk.com/images/favicon.ico\" type=\"image/x-icon\"&gt;  <br>  &lt;/head&gt;  <br />  &lt;body&gt;  <br />  &lt;h1&gt;" + document.forms["alltogethernow"]["headertitle2"].value + "&lt;/h1&gt;  <br />  &lt;p&gt;" + document.forms["alltogethernow"]["contenttext2"].value + "&lt;/p&gt;  <br />  &lt;/body&gt;  <br />  &lt;/html&gt;<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!!
__________________
Check out my
Please login or register to view this content. Registration is FREE

Last edited by Physicsguy; 05-20-2009 at 05:42 PM.. Reason: Updated code
Physicsguy is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-20-2009, 07:06 PM Re: Why Won't This Work!!??
Experienced Talker

Posts: 31
Trades: 0
When you say it doesn't work. What do you mean exactly? This may help us solve the problem.

Btw, I tried it and it led me a new page with some HTML, is this what should be happening?
GrantMePeace is offline
Reply With Quote
View Public Profile
 
Old 05-20-2009, 08:06 PM Re: Why Won't This Work!!??
Physicsguy's Avatar
404 - Title not found

Latest Blog Post:
Challenges
Posts: 824
Name: Scott
Location: Ontario
Trades: 0
Nevermind. I used the validator's HTML clean up and it fixed it

Thanks anyway! :P


EDIT: FINISHED!! Check out the finished product, please! (I'm VERY proud of it :P)
__________________
Check out my
Please login or register to view this content. Registration is FREE

Last edited by Physicsguy; 05-20-2009 at 09:40 PM..
Physicsguy is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Why Won't This Work!!??
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32346 seconds with 12 queries