Solved

Javasript in asp

Posted on 2004-10-20
3
199 Views
Last Modified: 2010-04-06
Can I put something like this:  <FORM><INPUT TYPE="BUTTON" VALUE="Go Back"
ONCLICK="history.go(-1)"></FORM>
in a response.write statement?

maybey I am just thinking wrong but I want the button to appear when an if is true.
0
Comment
Question by:dtolo
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
nan1217 earned 250 total points
ID: 12360761
Yes, you can do that.  For instance...

If myvalue=true Then
   Response.Write "<FORM><INPUT TYPE=""BUTTON"" VALUE=""Go Back"" ONCLICK=""history.go(-1)""></FORM>"
end if

Notice that in order to get the quotes to output, you have to escape them with another quote so all of the quotes are doubled up.

0
 
LVL 2

Author Comment

by:dtolo
ID: 12360870
This ends up giving me two back buttons.
0
 
LVL 2

Author Comment

by:dtolo
ID: 12360945
I am sorry.  I am buggin' thanks for your help ;)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now