[Javascript] Can't create <IMG> with ASP...very strange.

Ben ben at babelfish.co.uk
Sat May 5 22:35:13 CDT 2001


Can you post the *actual* HTML that the ASP renders? It would help to solve
the problem.  Also, you really should stick " chars around the img tag's src
attribute, like so:

	<img src="images/thisimage.jpg">

hth,

 .b

> -----Original Message-----
> From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
> Behalf Of Rui Fortes
> Sent: 06 May 2001 03:08
> To: javascript at LaTech.edu
> Subject: [Javascript] Can't create <IMG> with ASP...very strange.
>
>
> Hello
>
> I'm trying to create a table with pictures with asp.
> The images source file name is stored in a database.
> I'm constructing a string like this in vbscript:
>
>     myImgStr = "<img src = images/" & myRecSet(0) & ".gif >"
>
> and then I just use a "response.write(myImgStr)" inside a cell.
>
> The problem is that I just get the red X in the cells.
>
> If I try:
>
>     myImgStr = "<img src = images/" & "myimage.gif" & ".gif >"
>
> it works fine.
>
> Also if I compare two string created like this:
>
>     myImgStr1 = "images/" & myRecSet(0) & ".gif"
>     myImgStr2 = "images/" & "myimage.gif" & ".gif"
>
>     Response.write("<P>" & myImgStr1 & </P>")
>     Response.write("<P>" & myImgStr2 & </P>")
>
> the strings are identical.
>
> I even tested them like this:
>
> if myImgStr1 = myImgStr2 then Response.write("<P>Ok</P>")
>
>
> Whats happening? Why can't I use the recorset field in the string
> concatenation?
>
> Please help me because this is driving me crazy!
>
> Thanks
>
>
>
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript
>





More information about the Javascript mailing list