RE: [xsl] FW: Toggling radio buttons

Subject: RE: [xsl] FW: Toggling radio buttons
From: "Crowers, Steve" <scrowers@xxxxxxxxxxxx>
Date: Fri, 24 Aug 2001 12:08:50 -0400
take a quick look at the post from Jeni Tennison from a couple of hours ago
("Re: [xsl] grouping headers").  She describes both methods and the caveats
nicely.


Steve Crowers 
Software Engineer 


Liberate Technologies 
2 Walnut Grove, 
Suite 200 
Horsham, PA 19044 
Phone: 215-773-9400 x 9514 
Fax: 215-773-9401 
scrowers@xxxxxxxxxxxx 
http://www.liberate.com 

 

"The good Lord sets definite limits on man's wisdom but sets no limits on
his stupidity -- and that's just not fair." --Konrad Adenauer, German
Chancellor 



-----Original Message-----
From: Elisabeth Kaminski [mailto:ekaminski@xxxxxxxxxxxxx]
Sent: Friday, August 24, 2001 2:10 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] FW: Toggling radio buttons


I got that code form www.w3schools.com , in the XSL tutorial.

I will try <xsl:if test>.  How do I check for a value not equal to
something?
Thank you very much!

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Friedlander,
Hal
Sent: Friday, August 24, 2001 8:55 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE: [xsl] FW: Toggling radio buttons


i've never seen <xsl:if match="">do something</xsl:if>
how about trying <xsl:if test="">do something</xsl:if>

-----Original Message-----
From: Elisabeth Kaminski [mailto:ekaminski@xxxxxxxxxxxxx]
Sent: Friday, August 24, 2001 1:42 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] FW: Toggling radio buttons


Wow!  That's the most helpful email I've received yet!

Seriously....I have run through tutorials and am admittedly a beginner's
beginner.  But I've spent the last 4 weeks converting a 16 page web
application from ASP/VBScript to XML/XSL with no problems thus far.  What
pieces of code have I made up?

Let me try explaining again...maybe someone can help me!

I am filling my pages with AS/400 data.  We use ASP and Visual RPG to get
the data from the AS/400 (which is output in XML). We use XSL to render the
pages.  For this particular page,  I have Yes or No radio buttons.  If it's
the first time a user has accessed the page, (no values in the database
fields), I want the No radio button to be checked--else I want Yes to be
checked if the database field holds a Y and No to be checked if a database
field holds a N.

My page works if I do NOT have either radio button checked when a user first
enters the page with the following code:

 <input type="radio" name="rdoGIQ6" value="Y"
onClick="disableGroup(this.form, 'txtGIQ6T', false)">
 	<xsl:if match=".[hlfr9_questions/giq6='Y']">
      	<xsl:attribute name="checked">1</xsl:attribute>
      </xsl:if>
</input>Yes

<input type="radio" name="rdoGIQ6" value="N"
onClick="disableGroup(this.form, 'txtGIQ6T', true)">
      <xsl:if match=".[hlfr9_questions/giq6='N']">
     		<xsl:attribute name="checked">1</xsl:attribute>
      </xsl:if>
</input> No

If the value in the database field (hlfr9_questions/giq6) is blank I want
the No radio button to be checked as well.
Thank you all for your patience with a newbie...and your help is greatly
appreciated.
Elisabeth

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Robert Koberg
Sent: Thursday, August 23, 2001 1:35 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] FW: Toggling radio buttons


whoa... you need to take a look at the spec or run through a few tutorials.
You seem to be making up the language.



-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Elisabeth
Kaminski
Sent: Thursday, August 23, 2001 3:16 PM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] FW: Toggling radio buttons




-----Original Message-----
From: Elisabeth Kaminski [mailto:ekaminski@xxxxxxxxxxxxx]
Sent: Thursday, August 23, 2001 3:07 PM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: Toggling radio buttons


I am trying to set the default value of radio button on one of my pages.  I
haven't had any trouble setting the intial values, but when I change the
value by clicking on another button, my database is updated with the correct
value but it is still displaying the default value!!!  I've tried a couple
variations of code so far.  If I don't set a default value I don't have
problems.  But I was my users to see the No radio button checked even if
it's the first time on the page.

Here is my code.  The radio buttons are simple Yes No radio buttons with
values of Y and N, respectively.

 <input type="radio" name="rdoGIQ6" value="Y"
onClick="disableGroup(this.form, 'txtGIQ6T', false)">
 	<xsl:if match=".[hlfr9_questions/giq6='Y']">
      	<xsl:attribute name="checked">1</xsl:attribute>
      </xsl:if>
</input>Yes

<input type="radio" name="rdoGIQ6" value="N"
onClick="disableGroup(this.form, 'txtGIQ6T', true)">
      <xsl:if not=".[hlfr9_questions/giq6='Y']">
     		<xsl:attribute name="checked">1</xsl:attribute>
      </xsl:if>
</input> No

The above code sets the No radio button to checked when a user first access
the page.  When I select the Yes radio button, my  database gets updated
with the correct value Y but I'm still seeing the No radio button being
check.

I have also tried the following code with the same result:

<input type="radio" name="rdoGIQ1" value="Y"
onClick="disableGroup(this.form, 'txtGIQ1T', false)">
	<xsl:choose>
		<xsl:when test=".[hlfr9_questions/giq1='Y']">
			<xsl:attribute name="checked">1</xsl:attribute>
		</xsl:when>
	<xsl:otherwise>
	</xsl:otherwise>
	</xsl:choose>
</input>Yes

<input type="radio" name="rdoGIQ1" value="N"
onClick="disableGroup(this.form, 'txtGIQ1T', true)">
	<xsl:choose>
		<xsl:when not=".[hlfr9_questions/giq1='Y']">
			<xsl:attribute name="checked">1</xsl:attribute>
		</xsl:when>
	<xsl:otherwise>
	</xsl:otherwise>
	</xsl:choose>
</input> No

Am I even on the right track?  Any suggestions would be greatly appreciated!
Elisabeth


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread