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:
  document.images Syntax error  jb at 15:21 on Tuesday, December 14, 2004
 

Hi all.
i am redoing a site in vb.net that previously was done in asp.
this line is giving me a "Syntax error" in .net although it worked fine in asp.
document.images[imageID].src = eval(imageName + ".src");

This line is a part of this function:

function imageChange(imageID,imageName) {
document.images[imageID].src = eval(imageName + ".src");

}

this function gets called here:

<a href="<%=temppath%>" onMouseOver="imageChange('global','<%=iName%>')" onMouseOut="imageChange('global','alt0')"><%=objFile.Name%></a><br>

any help would be much appreciated.
Julia


  Re: document.images Syntax error  tgreer at 18:30 on Tuesday, December 14, 2004
 

You can't mix ASP and ASP.NET. You still have the asp "<% %>" delimiters in the code you posted.



  Re: document.images Syntax error  jb at 19:26 on Tuesday, December 14, 2004
 

thanks for the reply.
i did figure it out - it wasn't a syntax error as one might suspect; it was referring to the null IName parameter being passed.
i am not mixing asp and .net, i was using scripting in the .aspx page and hence <% to delimit vb script.
thanks again,
Julia



© Copyright codetoad.com 2001-2005