PDA

View Full Version : [CLOSED] Problem with an HTML string



feanor91
Apr 20, 2012, 7:38 AM
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').cr eateWindow();>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').cr eateWindow();>

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.

Daniil
Apr 20, 2012, 11:44 AM
Hi,

I would do it this way:

this.Window1.Html = string.Format("<a href=\"{0}\">{1}<a/>", "javascript:alert('Hello!');", "test");

feanor91
Apr 20, 2012, 12:12 PM
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').createWi ndow();" + """>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>"