472,967 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,967 software developers and data experts.

How to get a readonly tag into an input

I have the following code in a xslt-file:

<xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td>
<td><input class = "content" id = "{@id}" /></td>
</tr>
</xsl:for-each>
</xsl:template>

I would like to have:

<xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td>
<td><input readonly class = "content" id = "{@id}" /></td>
</tr>
</xsl:for-each>
</xsl:template>

To make the input readonly. But with this change the processor crashes. How
can this be done?

Feb 8 '07 #1
4 4239
Cecil Westerhof schrieb:
<xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td>
<td><input readonly class = "content" id = "{@id}" /></td>
</tr>
</xsl:for-each>
</xsl:template>

To make the input readonly
readonly="readonly"
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Feb 8 '07 #2
Cecil Westerhof wrote:
I have the following code in a xslt-file:

<xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td>
<td><input class = "content" id = "{@id}" /></td>
</tr>
</xsl:for-each>
</xsl:template>
What is the purpose of the redundant for-each loop in this template?

///Peter
Feb 8 '07 #3
Peter Flynn wrote:
Cecil Westerhof wrote:
>I have the following code in a xslt-file:

<xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td>
<td><input class = "content" id = "{@id}" /></td>
</tr>
</xsl:for-each>
</xsl:template>

What is the purpose of the redundant for-each loop in this template?
It is possible to hace severall outputfields in the inputfile and they
should all be transformed.

Feb 9 '07 #4
Johannes Koch wrote:
Cecil Westerhof schrieb:
> <xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td>
<td><input readonly class = "content" id = "{@id}" /></td>
</tr>
</xsl:for-each>
</xsl:template>

To make the input readonly

readonly="readonly"
This works. Thanks.

Feb 9 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt | last post by:
what's the differences between readonly and disabled attribute?? When I do the post, it couldn't get both values <%= fname %>. any ideas?? <input type="text" name="fname" value="Joe" readOnly>...
3
by: Gary Homewood | last post by:
I have a form with some input text fields, and I am toggling them between readOnly and enterable, using JavaScript. In Mozilla, when the input is set to readOnly, the background is greyed out...
4
by: datactrl | last post by:
HI, all I found the return value from obj.readOnly is always the original vaule in HTML setting, even after doing obj.readOnly=true/false. How can I get the real time value set by javascript? ...
3
by: Hamish | last post by:
I have an input box which is created with the readonly option included. Is it possible to turn this off. This is so the input box is not selectable untill a radio button is switched on. I...
5
by: Randell D. | last post by:
Folks, I have a few <INPUT TYPE=TEXT> tags that are readonly if a specific field has no value... these work fine. However, I also have checkboxes which I would like to have as readonly, but the...
2
by: upersson | last post by:
Hi! When accessing my web page I build up the javascript and html dynamically. Depending on an parameter I want to set all the fields (input tags) readonly. How do I do this? Of course I can...
7
by: Jimbo | last post by:
Hi, I am trying to set the readonly attribute of a text input tag dynamically from javascript. The input element already exists in the form and I want to make it readonly when a particular...
3
by: Hamed | last post by:
Hello I have a DataGrid object in my ASP.NET page that has the following template column. When I put the "readonly" attribute in the INPUT tag, it generates readonly="". <asp:TemplateColumn...
2
by: J. McConnell | last post by:
I am having trouble with the following code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.