Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 26, 2012 02:55 PM by Segundo
Member
271 Points
528 Posts
May 26, 2012 11:43 AM|LINK
Hello
When i adding my javascript function to stringbuilder with this codes:
b.Append("<div id='hoverPanelDiv' onmouseout=' HighlightTimeOut(" + table.Rows[0]["diaid"].ToString() + ") ' >");
its look like in my browser like this :
HighlightTimeOut(3)
for looking like HighlightTimeOut('3')
what i have to do?
PS: tried this
HighlightTimeOut('" + table.Rows[0]["diaid"].ToString() + "')
and look like HighlightTimeOut("3') '>
Thanks in advance
Contributor
5925 Points
1115 Posts
May 26, 2012 02:39 PM|LINK
b.Append("<div id=\"hoverPanelDiv\" onmouseout=\"HighlightTimeout('" + table.Rows[0]["diaid"].ToString() + "')\"></div>");
Copy the above line as it is. It will give you desired results.
Output: <div id="hoverPanelDiv" onmouseout="HighlightTimeout('3')"></div>
Star
10892 Points
1567 Posts
May 26, 2012 02:55 PM|LINK
Hi,
if the parameter in your javascript function is numeric, it doesn't need the simple ' ', simply use
b.Append("<div id='hoverPanelDiv' onmouseout='HighlightTimeOut(" + table.Rows[0]["diaid"].ToString() + ");' >");
Any doubt, post your comment.
omerdemir
Member
271 Points
528 Posts
JavaScript Function in StringBuilder Syntax How To?
May 26, 2012 11:43 AM|LINK
Hello
When i adding my javascript function to stringbuilder with this codes:
b.Append("<div id='hoverPanelDiv' onmouseout=' HighlightTimeOut(" + table.Rows[0]["diaid"].ToString() + ") ' >");its look like in my browser like this :
HighlightTimeOut(3)
for looking like HighlightTimeOut('3')
what i have to do?
PS: tried this
HighlightTimeOut('" + table.Rows[0]["diaid"].ToString() + "')and look like HighlightTimeOut("3') '>Thanks in advance
niksv
Contributor
5925 Points
1115 Posts
Re: JavaScript Function in StringBuilder Syntax How To?
May 26, 2012 02:39 PM|LINK
b.Append("<div id=\"hoverPanelDiv\" onmouseout=\"HighlightTimeout('" + table.Rows[0]["diaid"].ToString() + "')\"></div>");Copy the above line as it is. It will give you desired results.
Output: <div id="hoverPanelDiv" onmouseout="HighlightTimeout('3')"></div>
Segundo
Star
10892 Points
1567 Posts
Re: JavaScript Function in StringBuilder Syntax How To?
May 26, 2012 02:55 PM|LINK
Hi,
if the parameter in your javascript function is numeric, it doesn't need the simple ' ', simply use
b.Append("<div id='hoverPanelDiv' onmouseout='HighlightTimeOut(" + table.Rows[0]["diaid"].ToString() + ");' >");Any doubt, post your comment.
Blog: http://www.neuronasoft.net