Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 414
  • Last Modified:

creating a loop for a datalist

I have some javascript that pulls information off another site in the form of an array... what i want to do is have a loop go through the array and put this into a datalist  then break when there is nothing left in the array.

here is the code i'm working with:
<head>
<script language="JavaScript" type="text/javascript" src="http://oursite.com/js/specials_js.rvlx?no=4&type=cruise"></script>
</head>

here is how i am implementing it currently:

<td>
                              <script language='JavaScript'>
                        document.write ('<a href="' + special[0][4] + '"><img src="http://res.traveldynamicsgroup.com/' + special[0][2] +                                                                                             '"width="100" height="50" border="0"></a>');</script>
                    <td>

please advise.
0
odobo
Asked:
odobo
1 Solution
 
strickddCommented:
for(int i=0; i<ARRAYLENGTH; i++)
{
    for(int j=0; J<ARRAYLENGTH2; j++)
    {
          ArrayName[i][j];
    }
}

or

for(int i=0; i<ARRAYLENGTH; i++)
{
    ArrayName[i];
}
0
 
odoboAuthor Commented:
strickdd,
thank you for the reply. I couldn't end up doing what i intended to do as js is client side and asp being ss. i wanted to accomplish everything at runtime, but i found a work around for what i was doing. i am now having problems with another thing. please see my question on multiple validators. thanks again.

jared
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now