I have got an strange error

I have 2 pages
The first page is a list of dataitems from the database.
You click on one, and end up at page 2.

<TD
onClick="searchTrip('<%=URLEncoder.encode(sr.getRowid())%>')"><%=sr.getHemga
ngsDatum()%></TD>
<TD onClick="searchTrip('<%=URLEncoder.encode(sr.getRowid())%>')"><a
class="link" href="java script:
searchTrip('<%=URLEncoder.encode(sr.getRowid())%>');"><%=txtStep2Vidare%>
>></a></TD>

As you see I have an OnClick at the <td>. It's IE specific. But I also have
an link for the other browsers

My javascript code looks like this

function searchTrip(rowid)
{
  eval("document.location='step3.jsp?searchrow="+rowid+"'");
}

The click works fine, but at page3 the error occur.
First for IE
If you click on the TD, you will get the correct thing from the database.
If you click the link, you sometimes get the correct and sometimes the last
you were on.

If you use NS
If you click the link, you ALWAYS get the correct page.

I thought it was the cache that sabotaged, but i have now inserted these
lines on the BOTH pages

<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", -1); //prevents caching at the proxy
server
%>

The parameter that I send to page 2 is a rowid (Oracle) that get the correct
Dataitem.
I've tested the parameter and it is correct EVEN WHEN THE PAGE IS NOT!

the dataRecord is a preperedStatement.

Since it works ALWAYS in NS, i guess that it still can be an cache error
Is there something I've missed???

Any ideas are welcome...

//Jan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to