Getting Css to "hit" the text

N

Nat

Hi, I've got this code (which have beeb giving me lots of trouble...).
It's a .NET webapplikation project, written in C# - and now with some
Javescript written in to it:

--------------------
protected override void Render(HtmlTextWriter w)
{
if (helpString!=null)
{
w.Write("<span class='tooltipiconouter'><img title =
'"+this.helpString+"' class='tooltipIconInner' align='center' src =
'../Lib/images/questionmark.gif' a href='#' onclick = 'myWin =
window.open(\"\", \"\", \"width=300, height=200, directories=no\");
myWin.document.write(\"" +helpString+"\");'></a></span>");
}
}
--------------------

Now it would seem as if class='tooltipIconInner' have some affect on my
myWin.document.write(\"" +helpString+"\");
But it doesn't, why? Do I have to write class='tooltipIconInner' in to
the code some where diffrent or what?

The HTML that is generated look like this:

--------------------
<td><span id="_ctl0_EditOrganization1_EXTLABEL1"
class="brod">Text</span><span class='tooltipiconouter'><img title =
'TextTextTextText Text Text Text Text Text Text Text
TextTextTextText'class='tooltipIconInner' align='center' src =
'../Lib/images/questionmark.gif' a href='#' onclick = 'myWin =
window.open("", "", "width=300, height=200, directories=no");
myWin.document.write("TextTextTextText Text Text Text Text Text Text
Text TextTextTextText");'></a></span></td>
 
H

Hans Kesting

Nat said:
Hi, I've got this code (which have beeb giving me lots of trouble...).
It's a .NET webapplikation project, written in C# - and now with some
Javescript written in to it:

--------------------
protected override void Render(HtmlTextWriter w)
{
if (helpString!=null)
{
w.Write("<span class='tooltipiconouter'><img title =
'"+this.helpString+"' class='tooltipIconInner' align='center' src =
'../Lib/images/questionmark.gif' a href='#' onclick = 'myWin =
window.open(\"\", \"\", \"width=300, height=200, directories=no\");
myWin.document.write(\"" +helpString+"\");'></a></span>");
}
}
--------------------

Now it would seem as if class='tooltipIconInner' have some affect on my
myWin.document.write(\"" +helpString+"\");
But it doesn't, why? Do I have to write class='tooltipIconInner' in to
the code some where diffrent or what?

The HTML that is generated look like this:

--------------------
<td><span id="_ctl0_EditOrganization1_EXTLABEL1"
class="brod">Text</span><span class='tooltipiconouter'><img title =
'TextTextTextText Text Text Text Text Text Text Text
TextTextTextText'class='tooltipIconInner' align='center' src =

I don't see a space before "class", typo? The browser might like/require it.
'../Lib/images/questionmark.gif' a href='#' onclick = 'myWin =

Here you mix <a href> code into the <img> element. I think you want to
 
N

Nat

Thanks for your help. But I solved it, at last, by splitting it in to
pieces and adding some html (more document.write), like this:

-------------------------------
<img title = '"+this.helpString+"' align='center' src =
'../Lib/images/questionmark.gif' a href='#' onclick = 'myWin =
window.open(\"\", \"\", \"width=300, height=500, directories=no\");
myWin.document.write(\"<html><body bgcolor=#EDF4FB><font size=2
face=arial>\"); myWin.document.write(\""+helpString+"\");
myWin.document.write(\"</font></body><html>\");'></a></span>");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top