ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 18th, 2008, 09:49 AM
Quetzal Quetzal is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 5 Quetzal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 22 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old July 21st, 2008, 09:31 AM
janusz-jasinski janusz-jasinski is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2004
Location: Birmingham, UK
Posts: 661 janusz-jasinski User rank is Sergeant Major (2000 - 5000 Reputation Level)janusz-jasinski User rank is Sergeant Major (2000 - 5000 Reputation Level)janusz-jasinski User rank is Sergeant Major (2000 - 5000 Reputation Level)janusz-jasinski User rank is Sergeant Major (2000 - 5000 Reputation Level)janusz-jasinski User rank is Sergeant Major (2000 - 5000 Reputation Level)janusz-jasinski User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 13 h 5 m 9 sec
Reputation Power: 37
Send a message via MSN to janusz-jasinski
Next time, have a more useful title.
__________________

Reply With Quote
  #3  
Old July 21st, 2008, 09:39 AM
Quetzal Quetzal is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 5 Quetzal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 22 sec
Reputation Power: 0
Thanks for your advice njanusz-jasinski, I will endeavour to take it on board.

Do you have a useful reply?

Reply With Quote
  #4  
Old July 21st, 2008, 06:30 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 14th Plane (11500 - 11999 posts)
 
Join Date: Jun 2003
Posts: 11,764 Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level)Doug G User rank is General 6th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 3 h 31 m 19 sec
Reputation Power: 1364
Quote:
Originally Posted by Quetzal
Thanks for your advice njanusz-jasinski, I will endeavour to take it on board.

Do you have a useful reply?
You probably will have better luck asking in some client side flash forum.

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

Reply With Quote
  #5  
Old July 22nd, 2008, 04:10 AM
Quetzal Quetzal is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 5 Quetzal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 22 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Urgent assistance, please!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT