Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL attribute with no value

Status
Not open for further replies.

Sniipe

Programmer
Oct 9, 2006
115
IE
This is a kind of a strange one:
this code works sometimes, but not all the time
Code:
<xsl:if test="not(@tooltip) or @tooltip!=''">	
	<xsl:attribute name="onmouseover">return escape('<xsl:value-of select="@tooltip" />');
	</xsl:attribute>
</xsl:if>
What I have is a function that is called when a tooltip has a value. It works for drop downs, check boxes and text boxes, but it refuses to work with radio buttons.

I kinda guess this is a difficult question, so if you need more information please ask.

I basically don't want it to add that function when there is no value in tooltip or when it equals ''.
 
Code:
<question type="radio" id="TestQuestion" answerCell="B8" label="Test Radio" tooltip="" helpUrl="url" visible="true">
  <option id="Radio1" name="Radio1" label="1" checked="false">1</option> 
  <option id="Radio2" name="Radio2" label="2" checked="false">2</option> 
  <option id="Radio3" name="Radio3" label="3" checked="false">3</option> 
  <option id="Radio4" name="Radio4" label="4" checked="false">4</option> 
  </question>
Heh, I guess it would help. And infact it does help. Turns out that none of the options have tooltips with them... so... ??? Still don't know what to do really. If the element tooltip, does not exist as well?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top