By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,162 Members | 708 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,162 IT Pros & Developers. It's quick & easy.

Write a document to a page and submit using a button (and implement back button)

P: 8
the code found below is in a javascript file. what i am trying to do is to write a document to a page and submit it ( or to inplement a back ) .. for this i want to create a button .. when i wrote the following code nothing happend .. can your'll look in to this and let me know ..

Expand|Select|Wrap|Line Numbers
  2. document.write ("</table> <INPUT type=\"submit\" name=\"mysubmit\" value=\"Click!\"></body></head></html>")
i simply want to use a submit button here, where i can use the following code to implement a back.

Expand|Select|Wrap|Line Numbers
  2. <A HREF="javascript:javascript:history.go(-1)">Click here to go back to previous page</A>
can you do this ??
Jun 11 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Your HTML is incorrect in the document.write statement. You have a head closing tag after the body tag.

If you want a back button on the page, use a button and put the history.go in an onclick. You don't need a back button though - it's already provided!

PS. thanks for using code tags. Unfortunately, you used the wrong type. They're the square bracket type: [code ]
Jun 12 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.