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

x
?
Solved

How to call an ASP page when a user click a number

Posted on 1998-10-30
8
Medium Priority
?
144 Views
Last Modified: 2010-04-09
 I create a search-result page from an ASP page.

  Instead of just viewing an next and an prev button I
  want to add text like this: "<< 1 2 3 4 5 6 7 8 >>".
  The text is not static and will change according to
  what the user selects.
 
  When the user click one of the numbers I want to things
  to happen automatically:
  1. assign the selected number or "Prev" or "Next" to a
     hidden variable in the form.
  2. submit the form and call the same asp-page

  I'm familiar with using the POST action of a form, but
  when I try to generate buttons (n number) to represent
  the numbers nothing happens. When I just add a number
  as plain text there is not an event-code to manipulate.
 
  Any suggestions???

  I use FrontPage98 and VBScript

Erot/Norway
0
Comment
Question by:erot
  • 4
  • 3
8 Comments
 
LVL 1

Expert Comment

by:rajgn
ID: 1839280
Can you post the code which is generating your buttons?
0
 

Accepted Solution

by:
dkuntz earned 400 total points
ID: 1839281
If you put the text within a <DIV></DIV> tag, that can give you an onClick() event, and you can call the appropriate ASP from there.

Dennis
0
 

Author Comment

by:erot
ID: 1839282
DO you have some example syntax??
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Expert Comment

by:dkuntz
ID: 1839283
Here's a sample:
<HTML>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
   function dostuff() {
      alert("test message")
   }
</SCRIPT>
<DIV onClick="dostuff()">text here</DIV>
</BODY>
</HTML>

Dennis
0
 

Expert Comment

by:dkuntz
ID: 1839284
Here's a sample:
<HTML>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
   function dostuff() {
      alert("test message")
   }
</SCRIPT>
<DIV onClick="dostuff()">text here</DIV>
</BODY>
</HTML>

Dennis
0
 

Author Comment

by:erot
ID: 1839285
Two things:
  First.
  I make up the numbers "<< 3 4 5 6 7 >>" dynamically from
  within an asp Page. I don't know what the numbers are but
  they are stored in two variables. firstPage and lastPage.
  to generate the numbers I have to use a loop like this:
  for i = firstPage to lastPage

    <DIV onClick="dostuff( i )"> i </DIV>
 
  next

  this did not work....my syntax is wrong ...will upgrade to
  100 point if you returns right syntaks
 
  second. When I move the pointer over one of the generated
          numbers I would like it to change.. indicating that
          something will happen when you click it.
          Is this possible?
0
 

Expert Comment

by:dkuntz
ID: 1839286
This worked for me:

<SCRIPT LANGUAGE="JavaScript">
      function dostuff(i) {
      document.write (i);
      }
</SCRIPT>

<FORM>
<%for i = 1 to 5%>
<SPAN STYLE="cursor: hand" onClick='dostuff(<%= i%>)'><%= i%></SPAN>            
<%next%>
</FORM>
0
 

Author Comment

by:erot
ID: 1839287
Thanks a lot

Erot/Norway
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

963 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