|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Urgent assistance, please!
Hello
I have the following which works in a normal browser: Code:
<%@ Language="VBScript" %>
<%
If DateDiff("h", Application("rss-html-time"), Now()) >= 2 then
Set xmlDOM = Server.CreateObject("MSXML2.DOMDocument")
xmlDOM.async = False
xmlDOM.setProperty "ServerHTTPRequest", True
xmlDOM.Load("http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/technology/rss.xml")
'Get all of the <item> tags in the feed
Set itemList = xmlDOM.getElementsByTagName("item")
strHTML = strHTML & "<ul>"
'Iterate over each item
For Each item In itemList
'Parse the item children
For each child in item.childNodes
Select case lcase(child.nodeName)
case "title"
title = child.text
case "link"
link = child.text
case "description"
description = child.text
End Select
Next
'Build the HTML for each bullet item
strHTML = strHTML & "<li>"
strHTML = strHTML & "<a href='" & Server.HTMLEncode(link) & "'>"
strHTML = strHTML & Server.HTMLEncode(title)
strHTML = strHTML & "</a>"
strHTML = strHTML & "<br>"
strHTML = strHTML & description
strHTML = strHTML & "<br> "
strHTML = strHTML & "</li>"
Next
strHTML = strHTML & "</ul>"
Set xmlDOM = Nothing
Set itemList = Nothing
Application.Lock
Application("rss-html") = strHTML
Application("rss-html-time") = Now()
Application.UnLock
End If
Response.Write(Application("rss-html"))
%>
I now wish to pass the feed to Flash so that I can see the newsfeed through a movie. Flash does not like hyphens, so I need to wrap that value in the server method: Code:
Response.Write "&" & Server.URLEncode(Application("rss-html"))
Yet I can still not see anything in my movie. What am I doing wrong, please? Thanks. |
|
#2
|
|||
|
|||
|
Next time, have a more useful title.
__________________
|
|
#3
|
|||
|
|||
|
Thanks for your advice njanusz-jasinski, I will endeavour to take it on board.
Do you have a useful reply? |
|
#4
|
|||
|
|||
|
Quote:
I don't use or know flash coding, sorry. What doesn't work with the code statement you posted? Does the urlencode method somehow fail to urlencode the xml text properly? Does the page source in the browser show the proper html?
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#5
|
|||
|
|||
|
Hello Doug G
Yes, it is not easy to determine where the problem lies: ASP or Action Script, especially as I get no error messages with either. But I have now changed this: Code:
Response.Write(Application("rss-html"))
to this: Code:
Response.Write "&html=" & Application("rss-html")
The top Response.Write statement gives me the newsfeed in a normal browser, but I found it impossible to pass the values contained in Response.Write to Flash. In the second Response.Write statement I get this: &html= followed by my newsfeed, here: http://stevehigham59.7host.com/21July/BBCfeed.asp As I understand it, Flash is expecting the '&', so I thought that the &html would be suitable - yet I still can't see the newsfeed in my movie. There is no XML sheet: ASP does all that work, but there appears to be a problem with passing that ASP value (&html) into Flash or with Flash loading that ASP value - I can't determine which. Thanks for any help. Steve |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Urgent assistance, please! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|