SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist tangledman's Avatar
    Join Date
    Sep 2005
    Location
    Puerto de Mazarron, Murcia, Spain
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Why do I need to response.write the original string for this to work?

    I am decoding encoded HTML...I'm not sure why this won't work without first doing a response.write for the original string, which doesn't appear.

    If anyone can shed any light on this it would be appreciated.


    Code ASP:
     
    <%
    Dim page_html
     
    page_html = " &lt;table  cellpadding=\&quot;0\&quot; cellspacing=\&quot;0\&quot; width=\&quot;420\&quot; bgcolor=\&quot;#ffffff\&quot; style=\&quot;border:#46c3d3 1px solid;\&quot;&gt;        &lt;tr&gt;         &lt;td style=\&quot;background-color:#46c3d3; \&quot;&gt;         &lt;p  style=\&quot;padding-top:10px; padding-right:10px; padding-left:10px; font-weight:bold; font-family:arial; color:#fff; font-size:16px;\&quot;&gt;Backup and recovery pains are threatening your cool. To cure them, you need an efficient, cost-effective, transformational solution that captures less, ingests less, and stores less data. And frees up \&quot;lights-on\&quot; dollars for IT projects of higher strategic value. Recover your cool. Discover Asigra.&lt;/p&gt;         &lt;p style=\&quot;text-align: right;padding-right:10px;  font-weight:bold; font-family:arial;\&quot;&gt; Go forward with backup&lt;/p&gt;           &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td&gt;         &lt;p style=\&quot;padding-right:10px; padding-left:10px; font-weight:bold; font-family:arial; font-size:16px;\&quot;&gt;Doing more with less  a lot less.&lt;/p&gt;         &lt;p style=\&quot;padding-right:10px; padding-left:10px; font-family:arial;\&quot;&gt;In today\'s Cloud Computing era, IT organizations still clinging to traditional backup solutions are wasting brainpower and precious resources on what should be a routine task. By making Asigra their mantra, and transforming their incumbent backup solutions to efficient backup clouds, IT Leaders can evolve their environment without being constrained by recurring backup challenges.&lt;/p&gt;         &lt;p style=\&quot;padding-right:10px; padding-left:10px; font-weight:bold; font-family:arial; font-size:16px;\&quot;&gt;About Asigra&lt;/p&gt;           &lt;p style=\&quot;padding-right:10px; padding-left:10px; font-family:arial;\&quot;&gt;For more than 20 years Asigra has stayed ahead of the market with a secure, agentless, scalable and automated backup and recovery solution that aligns the value of data with its storage costs. IT Leaders evolve their environment, without being constrained by their recurring backup challenges, with innovative solutions from Asigra that currently protect over          &lt;br&gt;         &lt;img src=\&quot;i/asigra_overview.gif\&quot; alt=\&quot;asigra overview diagram\&quot;&gt;         &lt;/p&gt;                  &lt;/td&gt;        &lt;/tr&gt;               &lt;/table&gt;       &lt;br&gt;              &lt;table width=\&quot;420\&quot; bgcolor=\&quot;#142530\&quot;&gt;          &lt;tr&gt;         &lt;td&gt;          &lt;table cellpadding=\&quot;0\&quot; cellspacing=\&quot;0\&quot; width=\&quot;410\&quot;&gt;           &lt;tr&gt;            &lt;td style=\&quot;background-color:#FFF;\&quot;&gt;            &lt;p style=\&quot;padding-right:10px; padding-left:10px; font-weight:bold; font-size:16px; font-family:arial;\&quot;&gt;Asigra Product Advisor&lt;/p&gt;            &lt;/td&gt;            &lt;td style=\&quot;background-color:#FFF;\&quot;&gt;              &lt;p style=\&quot;text-align:right; padding-right:10px; padding-left:10px; font-weight:bold; font-size:16px; font-family:arial; color:#46c3d3;\&quot;&gt;            &lt;a style=\&quot;color:#46c3d3;\&quot; href=\&quot;[url]http://asigra.com/productadvisor/\&quot;[/url]  target=\&quot;_blank\&quot;&gt;Click here&lt;/a&gt;            &lt;/p&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;a href=\&quot;[url]http://asigra.com/productadvisor/\&quot;[/url] target=\&quot;_blank\&quot;&gt;&lt;img border=\&quot;0\&quot; src=\&quot;i/arrow.jpg\&quot;&gt;&lt;/a&gt;            &lt;/td&gt;           &lt;/tr&gt;            &lt;/table&gt;         &lt;br&gt;         &lt;td&gt;        &lt;/tr&gt;       &lt;/table&gt;  "
     
      Function HTMLDecode(page_html)
    	page_html = Replace(page_html, "&lt;","<" )
    	page_html = Replace(page_html, "&gt;",">" )
    	page_html = Replace(page_html, "\'","'")
    	page_html = Replace(page_html, "\&quot;","""")
    	page_html = Replace(page_html, "&quot;","""")
      End Function
     
    page_html_decoded = HTMLdecode(page_html)
     
    response.write page_html
    response.write page_html_decoded
     
    %>

  2. #2
    SitePoint Evangelist tangledman's Avatar
    Join Date
    Sep 2005
    Location
    Puerto de Mazarron, Murcia, Spain
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Answered elsewhere.

    I need the function to return a value.

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)
    Also discussed http://www.sitepoint.com/forums/showthread.php?t=691753

    Please do not start more than one thread dealing with the same topic, it can make things very confusing.

    Duplicate Thread Closed


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
  •