Ciao a tutti,
sto preparando un piccolo cms con gestione template.
Quando carico il template faccio così :
Dim objTextStream
Const fsoForReading = 1
Set objTextStream = fso.OpenTextFile(filePath, fsoForReading)
Dim template
template = objTextStream.ReadAll()
' load meta tags
template = replace(template, "[CMS:Title]", ShowMetaTag("Title") )
' load Description tags
template = replace(template, "[CMSescription]", ShowMetaTag("Description"))
' load Keywords tags
template = replace(template, "[CMS:Keywords]", ShowMetaTag("Keywords"))
' load jsScript
template = replace(template, "[CMS:jsScript]", loadjs()) <------ Problema qui!
...
response.write template
Il mio problema è che anche se loadjs() e' l'ultima sostituzione che faccio nel template, nella pagina caricata invece mi appare come prima!
in pratica se guardo l'html generato, ci sono prima i javascript e poi tutto il resto !!
l'unica differenza tra loadjs() e showmetatag() è che
Function showmetatag()
showmetatag = "bla bla"
End Function
mentre..
Function loadjs()
%><script type="text/javascript" src="myjs.js"></script><%
End Function
può essere questo il problema? che loadjs abbia %><% ??
![]()

escription]", ShowMetaTag("Description"))
Rispondi quotando