473,385 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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
  1.  
  2. document.write ("</table> <INPUT type=\"submit\" name=\"mysubmit\" value=\"Click!\"></body></head></html>")
  3.  
  4.  
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
  1.  
  2. <A HREF="javascript:javascript:history.go(-1)">Click here to go back to previous page</A>
  3.  
  4.  
can you do this ??
Jun 11 '08 #1
1 1500
acoder
16,027 Expert Mod 8TB
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

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

Similar topics

14
by: Chris | last post by:
Heres my problem: <a href="javascript:void(document.buysell.submit())" target="_parent" onMouseOver="MM_swapImage('members','','images/membersf2.gif',1)" onMouseOut="MM_swapImgRestore()"><img...
5
by: terence.parker | last post by:
I have a PHP application which I wrote last year - and the JavaScript worked fine then. For some reason, now it doesn't - neither on IE nor Firefox. Has something changed? When I click on my...
2
by: sushi | last post by:
Hello, I am using java script to post data back to the server when a button is clicked. In my web form, when a button is clicked, a javascript executes which submits data back to the server by...
12
by: VB Programmer | last post by:
I know some sites will display the following message if you click on the BACK button in your browser. How do I implement this feature? Warning: Page has Expired The page you requested was...
11
by: Russ | last post by:
My web app writes some binary data to a file at the client site via Response.Write and Response.BinaryWrite. This action is accomplished in response to a button click, with C# code behind as...
12
by: Tom wilson | last post by:
This is the same topic as the thread above, "Dealing with the Back button". I'm getting nowhere. The closest I've come is a sample left for me: <%@ Page Language="vb" %> <!DOCTYPE HTML PUBLIC...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
1
by: Angelos | last post by:
Hello there, I am very new to Javascript and before I explain what I want I'll tell you in a few words that I am trying to make a button on a WYSIWYG text editor (RichArea) that previews on a...
1
by: anupamaavadutha | last post by:
hi all, iam new to javascript. i have problem calling javascript functions.iam designing a calender page.here is my code. <%@ page...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.