473,503 Members | 4,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4258
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
1965
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
23463
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
9877
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
16608
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
5613
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
4420
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
5481
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
1844
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
5441
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
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.