Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

HTML Linking

Posted on 1998-07-23
10
Medium Priority
?
202 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 360 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

Technology Partners: 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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

916 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