codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  accessing anchor <a> value  alimirmd at 13:42 on Monday, May 28, 2007
 

Hi,
Well,actually,I am not sure whether I have written a correct subject or not.

Actually,I have created a JSP page,which displays records,,,,like any inbox folder,which displays a list of messages,,,, or the best example would be our forum.Here,we have a list of topics.As new topics get added,old topics move to next page.At the top,we have anchor links to different pages 1.2.3.4.5.......As we click the page number,it will take us to that page.
I want to create something like that.My code skeleton would be:

<%
for(int i=0;... )
{
%>
</a href="/forum/mypage_strr_val.html"><%=i%></a>
<%
String val=request.getParameter("val");
if(val!=null) // anchor is clicked
{
for(......)
{
//display records
}
break;
} // end if
} // end outer for

I get the links 1,2,3,,,,.As soon as I click any link,the records of that page are displayed,,,,but the links disappear.Only link for the first page (i.e. 1) is left. Everything is o.k....But as soon as I click a page number,I get the records of that page,but the links(2,3,4,,,,,) disappear. Only link with value 1 is left.If I click it,then I go to the first page.I don't know where to put the break statement.
If I remove the break statement,,,the records of that page will b displayed and even the links won't disappear.But,as soon as I click another link, it will take me to the first page only...i.e. only the first 10 records r displayed.Only the first page appears.....

I hope I was clear.If u have any doubts,plz ask me.I will send my complete code.Even if u provide me a skeleton of how to work,I shall b very thankful....

Hope to get a reply soon.....Thanks.............








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  How to send multiple perameters in SOAP request.
•  Java code for Insert picture on the table in spreadsheet
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me
•  pls help me with this..
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007