Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anchor array?

Status
Not open for further replies.

pkailas

Programmer
Jun 10, 2002
555
US
I am trying to user the window.open command so I can control how the window looks. I'm retrieving many rows from a database. The following code does retrieve everything I need, but when I click on a link, it always opens the last record retrieved. Do I need to make some kind of an array to separate the links so they open the correct "Image= " value? if so, how do I do that?

note: the alert is just for debugging

<td><a name=&quot;viewer&quot; onclick=&quot;viewer()&quot;><center><img src=&quot;images/view1.gif&quot; align=absmiddle border=0></center></font></a></td>
<script language=&quot;JavaScript&quot;>
var jvar = &quot;<%=x_Image%>&quot;;
var juser = &quot;<%=Session(&quot;SLogin&quot;)%>&quot;;
var jstring = &quot;java/view.asp?Image=&quot;+jvar+&quot;&ID=&quot;+juser;
function viewer()
{
window.open(jstring,&quot;viewer&quot;); void 0;
}
alert(jstring);
</script>
 
I don't see any looping of recordset in your script. It means the data value of jstring is always a constant. May be you should post a bit more of your script here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top