SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inline VBScript causes syntax error in different VBScript Class

    Hi everyone, this seems to be quite a complex problem. I've been racking my brains for days about this and can't figure out why this problem occurs. If anyone can help I would be very greatful.

    I have an ASP Page that has several nested includes in it. The original ASP Page has some inline VBScript. One of the nested includes uses a VBScript Class. On the problem page if I position the include before the inline VBScript the code works without issue however the html that the include produces is not in the correct place. If I position the include after the inline script then I receive the following error.


    Microsoft VBScript compilation error '800a03ea'

    Syntax error

    /templates/tab/rss_content_feed_class.1 <dot asp>, line 10

    Class RSSContentFeed
    ^


    Does anyone have any ideas? I'm desperate!

    I've had to attach the code as text files because the forum keeps telling me I'm trying to post URL's when I'm not yet allowed to.

    This is the order the code excutes
    Story <dot asp> loads
    Rightcoloads_Story_Mpus <dot asp> is included in story <dot asp>
    tabsrss <dot asp> is included in Rightcoloads_Story_Mpus <dot asp>
    tab1 <dot asp> is included in tabsrss <dot asp>
    rss_content_feed_class.1 <dot asp> is included in tab1 <dot asp>

    rss_content_feed_class.1 <dot asp> contains the VBScript with the supposed syntax error...
    Attached Files Attached Files

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,037
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Hmmm.... I've been giving this some thought off and on today and it seems that as it is a Syntax error perhaps you are defining the class inside a loop or inside of another class or function. Could that be the case?
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  3. #3
    SitePoint Guru
    Join Date
    Jun 2007
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I doubt if anyone is going to sort through all those files.

    Normally class files are included outside of all content presentation and instantiated as an object where needed.

    Hence positioning should be irrelevant.

  4. #4
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you to both of you for your replies. I really appreciate you taking the time to look at this problem. Awasson, the class isn't defined inside a loop or another class function although it is defined at the bottom of a stack of nested includes. It's very strange because the code works fine when the first include in the stack of nested includes (rightcoloads_story_mpus <dot asp>) is positioned above the following vbscript (see below) if it's positioned after then you get the syntax error as described in the original post. Webber123456 yes I thought it might be a bit optimistic to post all those files but I'll try anything at this point. I've already spent a disproportionate amount of time trying to solve this issue. Rewriting is not an option so if I can't resolve this it will be the scrap yard for this particular functionality. The class that has the syntax error is free to download functionality from <world wide web>tele-pro<dot co dot uk>/scripts/rss/ . I've looked on their site and their no posts about this ever happening... Anyway thank you to both of you for taking the time to view the problem.

    Code:
    
    							<&#37;
    							'Display Story Crumb
    							'XmlParams = "<parameters>" & _
    							'				"<spparameters>" + _
    							'					XslSpParam("storycode", cstr(oStory.StoryCode)) +_
    							'					XslSpParam("catcode", cstr(iCatCode)) +_															
    							'				"</spparameters>" & _					
    							'			"</parameters>"
    							'<p class="publication"><span>Presented by <a href="#">Publication Name</a> &amp; Publication Name</span></p>	
    						
    							XmlParams = "<parameters>" & _
    											"<spparameters>" & _
    												XslSpParam("pubcode", cstr(iPubCode)) & _														
    											"</spparameters>" & _					
    										"</parameters>"
    							dim sXmlPubStructure	
    							
    							sXmlPubStructure = InsertControl("category_publication_stucture",XmlParams)
    
    							XmlParams = "<parameters>" & _
    											"<spparameters>" + _
    												XslSpParam("storycode", cstr(oStory.StoryCode)) +_															
    											"</spparameters>" & _
    											"<paramdata>" & _
    												sXmlPubStructure & _
    											"</paramdata>"	& _				
    										"</parameters>"
    							
    							Response.Write InsertControl("story_crumb",XmlParams)
    
    							'
    							'Show full story or access denied version
    							'
    							if bShowFullStory then
    
    								'Display Story Title Picture Before Main story Details
    								if oStory.LayoutStyle = "2" then
    
    									XmlParams = "<parameters>" + _
    													"<spparameters>" + _
    														XslSpParam("storycode", cstr(oStory.StoryCode)) +_
    														XslSpParam("imagerole", "Title Picture") +_
    													"</spparameters>" + _
    													"<xslparameters>" + _
    														"<xslparam name=""layoutcolor"">" & cstr(oStory.LayoutColour) & "</xslparam>" + _
    														"<xslparam name=""layoutstyle"">" & cstr(oStory.LayoutStyle) & "</xslparam>" + _
    														"<xslparam name=""encryptedqueystring""><![CDATA[" & sEncryptedQueyString & "]]></xslparam>" + _
    													"</xslparameters>" + _
    												"</parameters>"
    						
    									Response.write(InsertControl("story_displaypicture",XmlParams))
    											
    								end if
    								%>

  5. #5
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For anyones who's interested the cause of this problem seems to be that there is an if else vb script condition that separates large sections of the story <dot asp> page. By splitting the if else statement into two separate if statements and positioning right_story_mpus <dot asp> include between the two if statements the problem doesn't occur and the html is positioned in the correct place.

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,037
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Ok, that does make sense.
    Glad you got it sorted out
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development


Bookmarks

Posting Permissions

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