urgent javascript question??

Results 1 to 2 of 2

Thread: urgent javascript question??

  1. #1
    cristie Guest

    Default urgent javascript question??

    Hi,<BR>I am using a mouse swap function in javascript.<BR>i need to have an array passed into the function.<BR>this array should contain the images from the database, say rs("images").<BR>now how do i put the images into an array and pass it into the javascript function.<BR><BR>Please help me,<BR>Thanks,<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: urgent javascript question??

    Im not quite sure how you pass an array in javascript to a function but Im sure its just like passing in other varible. But heres one thing that might help you. say you have your field.. rs("images"). Im going to assume you meant there was 1 image per record and it was representing a string of text that was an image. for instance each record would contain "image1.jpg" "image2.jpg".. etc. post a followup if your conditions are different<BR><BR>&#060;script&#062;<BR><BR>//Im might be totally wrong on this because I dont fully understand your conditions. <BR><BR>ar = new array(10) <BR>&#060;%looper=0%&#062;<BR>&#060;%while not rs.eof and not rs.bof%&#062;<BR>ar[&#060;%=looper%&#062;] = &#039&#060;%=rs("image")%&#062;&#039<BR>&#060;%rs. movenext%&#062;<BR>&#060;%wend%&#062;<BR><BR>// now you have a predifined javascript array of images. I think you can just pass it like this<BR>mouseswap(ar) //as long as it was properly defined in mouseswap.<BR>//I could be wrong. Follow up and let me know if it helped.<BR>&#060;/script&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts