Solved

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

Posted on 1998-10-30
8
139 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 100 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
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!

 

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

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

Suggested Solutions

Title # Comments Views Activity
Obtaining data on ASP 8 35
Date on a table 16 34
links not working 2 26
aria difference 2 14
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

756 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