Solved

HTML Linking

Posted on 1998-07-23
10
182 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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

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
 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
manage footer size 4 73
how to see all occupied ports on windows 10 laptop 15 77
Fulfillment API php code sample 1 59
Eloquent ORM manual paginator defaults to simple 2 31
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

820 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