[CLOSED] Problem with an HTML string

  1. #1

    [CLOSED] Problem with an HTML string

    Hello

    I want to pass a link in the HTML attribut of a window:


    Html="<br /><br /><center><b>ResMed KPIs global Version 2.0.0.0 Alpha 1</b></center><br /><br /><center><b><a href='javascript:#{MyDesktop}.getModule('News').createWindow();>What's new in this version</a></b></center><br /><br /><center>For query, information, help: <a href='mailto:bruno.teuile@resmed.fr'>contact</a></center>"
    the problem is on that part :

    <a href='javascript:#{MyDesktop}.getModule('News').createWindow();>
    I'm not able to know how I can pass then 'News' name to the string because I already have quote around href attibute...

    I try '', changing the ' by ", double ", /' \', /", \", nothing seems to work.
    Last edited by Daniil; Apr 20, 2012 at 12:33 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I would do it this way:
    this.Window1.Html = string.Format("<a href=\"{0}\">{1}<a/>", "javascript:alert('Hello!');", "test");
  3. #3
    Thanks it works.

    FYI the string inVB:

    wndAbout.Html = "<br /><br /><center><b>test</b></center><br /><br /><center><b><a href=""" + "javascript:#{MyDesktop}.getModule('News').createWindow();" + """>Whats new in this version</a></b></center><br /><br /><center>For query, information, help: <a href='mailto:bruno.teuile@resmed.fr'>contact</a></center>"

Similar Threads

  1. Cant send html string as parameter to AjaxMethod
    By masudcseku in forum 1.x Help
    Replies: 9
    Last Post: Jul 19, 2011, 10:38 PM
  2. Can I send a string with html tag to Ajaxmethod?
    By masudcseku in forum 1.x Help
    Replies: 1
    Last Post: Jul 19, 2011, 10:31 PM
  3. Replies: 1
    Last Post: Feb 28, 2011, 8:13 AM
  4. Replies: 4
    Last Post: Feb 01, 2011, 11:54 AM
  5. Replies: 3
    Last Post: Nov 12, 2008, 5:16 AM

Posting Permissions