Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Javasript in asp

Posted on 2004-10-20
3
Medium Priority
?
210 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 1000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

810 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