The code syntax (as provided) is still wrong
--
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________
| Thanks Stefan
|
| I checked through my borrowed code and found that I had created broken lines
| of code causing code failure rather than bits missing or "wrong" but will
| try your version too when I get round to testing on line.
|
| M
|
| --
| ---
| | > The code provided has a syntax error
| > - which would be obvious if you added a debug line after it as:
| > response.write ItemTemplate
| >
| > You were provided the following
| >
| > ItemTemplate = "<tr><td><a target=blank href=" & """{LINK}""" &
| > ">{TITLE}</a><BR>{DESCRIPTION}</td></tr>"
| >
| > And for the replace to work it should just be
| >
| > ItemTemplate = "<tr><td><a target='blank'
| > href='{LINK}'>{TITLE}</a><BR>{DESCRIPTION}</td></tr>"
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | > | ... The modified code...
| > |
| > | <%
| > | Response.Expires = -1
| > |
| > |
| > | FEEDSRC_RSS =
| > | "
http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml"
| > |
| > |
| > | MaxNumberOfItems = 10 '----------set to number of entries to show from
| > feed
| > |
| > |
| > | MainTemplateHeader = "<table>"
| > | MainTemplateFooter = "</table>"
| > |
| > |
| > | Keyword1 = "BBC NEWS KEYWORD 1"
| > | Keyword2 = "Keyword 2 content"
| > |
| > |
| > | ItemTemplate = "<tr><td><a target=blank href=" & """{LINK}""" &
| > | ">{TITLE}</a><BR>{DESCRIPTION}</td></tr>"
| > |
| > |
| > | ErrorMessage = "Data error from feed: " &FEEDSRC_RSS & "<BR><a
| > | href=""
http://www.SiteName/feedback.asp"">Please inform the
| > webmaster.</a>"
| > |
| > |
| > | Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
| > | xmlHttp.Open "Get", FEEDSRC_RSS, false
| > | xmlHttp.Send()
| > | RSSXML = xmlHttp.ResponseText
| > |
| > |
| > | Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0")
| > | xmlDOM.async = false
| > | xmlDOM.LoadXml(RSSXML)
| > |
| > |
| > | Set xmlHttp = Nothing
| > |
| > |
| > | Set RSSItems = xmlDOM.getElementsByTagName("item")
| > | Set xmlDOM = Nothing
| > |
| > |
| > | RSSItemsCount = RSSItems.Length-1
| > |
| > |
| > | if RSSItemsCount > 0 then
| > | Response.Write MainTemplateHeader
| > | End If
| > |
| > |
| > | j = -1
| > |
| > |
| > | For i = 0 To RSSItemsCount
| > | Set RSSItem = RSSItems.Item(i)
| > |
| > |
| > | for each child in RSSItem.childNodes
| > | Select case lcase(child.nodeName)
| > | case "title"
| > | RSStitle = child.text
| > | case "link"
| > | RSSlink = child.text
| > | case "description"
| > | RSSdescription = child.text
| > | End Select
| > | next
| > |
| > |
| > | If (InStr(RSSTitle,Keyword1)>0) or (InStr(RSSTitle,Keyword2)>0) or
| > | (InStr(RSSDescription,Keyword1)>0) or (InStr(RSSDescription,Keyword2)>0)
| > | then
| > |
| > |
| > | j = J+1
| > |
| > |
| > | if J<MaxNumberOfItems then
| > | ItemContent = Replace(ItemTemplate,"{LINK}",RSSlink)
| > | ItemContent = Replace(ItemContent,"{TITLE}",RSSTitle)
| > | Response.Write Replace(ItemContent,"{DESCRIPTION}",RSSDescription)
| > | ItemContent = ""
| > | End if
| > | End If
| > |
| > |
| > | Next
| > |
| > |
| > | if RSSItemsCount > 0 then
| > | Response.Write MainTemplateFooter
| > | else
| > | Response.Write ErrorMessage
| > | End If
| > |
| > |
| > | %>
| > |
| > | --
| > | ---
| > | | > | > Hi
| > | >
| > | > I tried the asp solution and got the following error
| > | >
| > | > Error Type:
| > | > Microsoft VBScript compilation (0x800A03EA)
| > | > Syntax error
| > | > /inc_rss.asp, line 19, column 63
| > | > ItemTemplate = "<tr><td><a target=blank href=" & """{LINK}""" &
| > | > --------------------------------------------------------------^
| > | >
| > | > Any guidance available?
| > | >
| > | > Thanks
| > | > M
| > | >
| > | > --
| > | > ---
| > | > | > | >> Dear Sitara,
| > | >> I wrote the complete answer to this very question for someone else,
| > and I
| > | >> am too lazy yo do it again, so, if you wouldn't mind, please read
| > | >>
| >
http://groups.google.com/group/micr...328f2/045f6b9ff3771ab5?hl=en#045f6b9ff3771ab5 -
| > | >> it is very simple to do. Good luck.
| > | >>
| > | >> Nicholas Savalas
| > | >>
http://savalas.tv
| > | >> --
| > | >>
| > | >> | > | >>> Can someone please advise a simple solution for syndicating an RSS
| > feed
| > | >>> (from a blog, for instance) onto a page on my site (created by
| > FP2003)?
| > | >>> Thanks
| > | >>>
| > | >>
| > | >>
| > | >
| > | >
| > |
| > |
| >
| >
|
|
|
|