Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004

    Unanswered: php dhtml vbscript problem

    I have a page of vbscript included by "include file" in a php.
    Line 443 shows error:

    Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\search\cat\cdynlistbox.php on line 443
    Line 443 is:
    sTemp = sTemp & "<xsl:stylesheet xmlns:xsl="""">" & vbCrlf
    <script language="VBScript" runat="server">
    	Private Function GetXSLStream()
    		Dim sTemp
    		sTemp = "<?xml version='1.0'?>" & vbCrlf
    		sTemp = sTemp & "<xsl:stylesheet xmlns:xsl="""">" & vbCrlf
    		sTemp = sTemp & "<xsl:template match=""/"">" & vbCrlf
    		sTemp = sTemp & "if (!assocArray) var assocArray = new Object();<xsl:for-each select=""root/table1"">" & vbCrlf
    		sTemp = sTemp & "assocArray[""%listname%=<xsl:value-of select=""@search"" />""] = new Array(" & vbCrlf
    		sTemp = sTemp & "<xsl:for-each select=""table2"">" & vbCrlf
    		sTemp = sTemp & "<xsl:value-of select=""table2"" />    ""<xsl:value-of select=""@dvalue"" />"",""<xsl:value-of select=""@display"" />""," & vbCrlf
    		sTemp = sTemp & "</xsl:for-each>    ""EOF"");</xsl:for-each>" & vbCrlf
    		sTemp = sTemp & "</xsl:template>" & vbCrlf
    		sTemp = sTemp & "</xsl:stylesheet>" & vbCrlf
    		GetXSLStream = sTemp
    	End Function
    If you want the full script then check out the attached file zipped and in a txt file.
    Attached Files Attached Files
    Compare bible texts (and other tools):

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    esacpe your double quotes / speech marks
    sTemp = sTemp & "<xsl:stylesheet xmlns:xsl=\"\">" & vbCrlf

    mind you that error suggest to me that you need to switch off PHP processing in that block as the PHP parser thinks that is PHP code its handling

    does vbscript run on other browsers apart from IE?

  3. #3
    Join Date
    Mar 2007
    VBScript should work in most browsers so long as it has a handler for it. It's just another syntax for the same thing as javascript really.

    Edit: i'm going to correct myself here, vbscript DOESN'T work in FF...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts