Hi,
I am trying to insert an image within the Grid DTC (Design Time Control). This function works:
<SCRIPT LANGUAGE=JavaScript RUNAT=Server>
function w(){
return('<IMG src=" +
'pict.gif">');'"'
}
</SCRIPT>
Field/Expression:
=w()
The function above works with a referred picture path (pict.gif) only (I mean the referred path in this case) ; however, if I use a modified function to insert variable "img" instead of pict.gif I get error message "undefined", in other words, I am not able to write variable "img" into the Grid DTC using Response.Write:
function w(){
return('<IMG src=" +
Response.Write(img)">');'"'
}
Variable "img" is obtained from the following code:
set adoRS=oConn.Execute ("select prod_id, pict from product " &_
"where(prod_id) = 2000" // prod_id is a variable, code is simplified for demonstration purpose only
img = adoRS("pict".value
This works fine, I am able to write variable "img" into the page using server side code <%=img%>,
For example, <IMG src="
However, a function written in VBScript using <%=img%> and called within the Grid control, doesn’t work within the DTC Grid that is written in JavaScript and run at server.
If anyone knows a way to work around this I would be very appreciative of the assistance.
I am trying to insert an image within the Grid DTC (Design Time Control). This function works:
<SCRIPT LANGUAGE=JavaScript RUNAT=Server>
function w(){
return('<IMG src=" +
'pict.gif">');'"'
}
</SCRIPT>
Field/Expression:
=w()
The function above works with a referred picture path (pict.gif) only (I mean the referred path in this case) ; however, if I use a modified function to insert variable "img" instead of pict.gif I get error message "undefined", in other words, I am not able to write variable "img" into the Grid DTC using Response.Write:
function w(){
return('<IMG src=" +
Response.Write(img)">');'"'
}
Variable "img" is obtained from the following code:
set adoRS=oConn.Execute ("select prod_id, pict from product " &_
"where(prod_id) = 2000" // prod_id is a variable, code is simplified for demonstration purpose only
img = adoRS("pict".value
This works fine, I am able to write variable "img" into the page using server side code <%=img%>,
For example, <IMG src="
However, a function written in VBScript using <%=img%> and called within the Grid control, doesn’t work within the DTC Grid that is written in JavaScript and run at server.
If anyone knows a way to work around this I would be very appreciative of the assistance.