MWGainesJR
asked on
VBScript variable in HTML IMG tag
I have this VBscript:
<SCRIPT LANGUAGE="VBScript">
ext = replace(right("{DOC:FileNa me}",4),". ","")
</SCRIPT>
I need to place ext as the file name in:
<img src="{FILES_DIR}/template/ powerview/ matter/Doc Icons/(pla ce ext here).jpg" height=20>
What is the proper way to do this?
<SCRIPT LANGUAGE="VBScript">
ext = replace(right("{DOC:FileNa
</SCRIPT>
I need to place ext as the file name in:
<img src="{FILES_DIR}/template/
What is the proper way to do this?
ASKER
Will the FSO method return the extension even if the filepath and name stored in DOC:Filename isn't on the same machine?
Doc:Filename is simply a field with a string.....may not be accessible from current machine.
Doc:Filename is simply a field with a string.....may not be accessible from current machine.
FSO will accept a file or a string as an arg so it should work. If you caled this it would work so it should be the same:
sExt = CreateObject("Scripting.Fi leSystemOb ject").Get ExtensionN ame("c:\te st.vbs")
sExt = CreateObject("Scripting.Fi
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I'll try the innerHTML and get back.
ASKER
Thanks
sExt = CreateObject("Scripting.Fi
For the placement inline, you can just use ASP to do inline. Here is an example:
<html>
<head>
<%
sub vbproc(num1,num2)
response.write(num1*num2)
end sub
%>
</head>
<body>
<p>Result: <%call vbproc(3,4)%></p>
</body>
</html>