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








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: need code to export html report to excel and autosave with current date as filenaem
•  Re: can`t compile...
•  Re: Describing code segment (newbie stuff)
•  Re: C++ Beginner question
•  Text to Image Rollover
•  Re: interview problem
•  Datagrid formating and postback
•  Re: Computer Name in Web page
•  Re: how read floating data from notepad and analysis it


Recent Articles
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net
Creating CSS Buttons


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005