Solved

HTML Linking

Posted on 1998-07-23
10
158 Views
Last Modified: 2013-12-25
I have an ASP page with a form containing ActiveX components.  When I click a button I update a database using the ActiveX components and then I want to send the user to another page.  How do I send then to the next page?
0
Comment
Question by:obsrhayden
  • 5
  • 4
10 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 1858623
<%
Response.redirect("anotherpage.asp")
%>

This works only when there is no HTML output before this statement, not even <HTML>
0
 

Author Comment

by:obsrhayden
ID: 1858624
There is HTML before this.  What I want are a series of buttons that when clicked execute some code and then send the user to a given page.
0
 
LVL 28

Expert Comment

by:sybe
ID: 1858625
I do not understand your question quite clear.
Trying to understand:

You _have_ a page with buttons.

The user clicks a button and a database is updated. The way that that is done usually is that a form is send. So your page has a form with buttons.

Then when a button is clicked, the form is send to the server following <form action="response.asp">

On the server response.asp processes tha data from the form and updates the database, and sends a respons back to the browser.

But you want to redirect the browser to another page.

So that is why i wrote my answer. In response.asp use the code I proposed. If I got you wrong, then tell me where I do not understand your problem.


0
 

Author Comment

by:obsrhayden
ID: 1858626
This is what I want,
- a page with various buttons
- when clicked each button preforms some VBscript and then send the various to a different page.
- each button may send the user to a different page
0
 
LVL 28

Expert Comment

by:sybe
ID: 1858627
for example:

page 1:

===============
<form action="page2.asp">
....form fields ??....

<input type="submit" name="button1" value="button1">
<input type="submit" name="button2" value="button2">
<input type="submit" name="button3" value="button3">

</form>

==========================
page2.asp:
==========================

<%
' Doing some VB-stuff such as database updates
'
'
'
'
' and at the end:

If Request("button1") <> "" Then
  Response.redirect("page1.htm")
ElseIf Request("button2") <> "" Then
  Response.redirect("page2.htm")
ElseIf Request("button3") <> "" Then
  Response.redirect("page3.htm")
End If

%>

0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:obsrhayden
ID: 1858628
The problem is that I have two MSFlexGrids that the user can update.  These cannot be referenced from the next page so either I must update the database on the first page then move to the second page (how to do?) or build a string with the contents of the FlexGrid before submitting the form and useing it as a parameter(how to do?)  So if you could explain to me how to do one of the above I'd be very grateful
0
 

Author Comment

by:obsrhayden
ID: 1858629
The problem is that I have two MSFlexGrids that the user can update.  These cannot be referenced from the next page so either I must update the database on the first page then move to the second page (how to do?) or build a string with the contents of the FlexGrid before submitting the form and useing it as a parameter(how to do?)  So if you could explain to me how to do one of the above I'd be very grateful
0
 
LVL 2

Accepted Solution

by:
Jagar earned 120 total points
ID: 1858630
Try this in the On_Click event of you button first do your database stuff that at the end of the procedure put this line (it's in VBScript, if you use Java I'm sure you can change it to the correct syntax for Java)

document.href = "www.yoursite.com/NewPage.htm"

0
 
LVL 28

Expert Comment

by:sybe
ID: 1858631
Hmm, so you want to use the MSFlexGrids to update the database. I don't know exactly what it is, except that I understand that it is an ActiveX control.
It all depends on the methods and properties of the MSFlexGrid. I thought you were talking about forms (that is what I usually associate "buttons" with when it comes to HTML).

I am afraid that if the MSFlexGrid has an onClick-method, that this will be performed before the database update, and that the database update won't take place.

If you know of a place were this ActiveX control is used, I could take a look at it.
0
 

Author Comment

by:obsrhayden
ID: 1858632
Is actually
document.location.href = "www.monkey.com"
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

744 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

13 Experts available now in Live!

Get 1:1 Help Now