473,700 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a field that cannot be edited throuh the ui form itself

Hi

I want to create fileds on my form that can not be manually edited
through the UI of the form. Instead the (visible) content is changed
through changes on other parts of the form.
e.g. making a selection from a list changes the content of the field
mentioned above.
I don't know the html code to create such a field on my form. Can
anyone help me out?

Regards

Jul 23 '05 #1
5 1774
"Lando Chez" <go********@hot mail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
Hi

I want to create fileds on my form that can not be manually edited
through the UI of the form. Instead the (visible) content is changed
through changes on other parts of the form.
e.g. making a selection from a list changes the content of the field
mentioned above.
I don't know the html code to create such a field on my form. Can
anyone help me out?


<form name="myForm">
<input type="text"
name="readonlyI nput"
value="The value"
defaultvalue="T he value"
readonly="reado nly"
onchange="this. value=this.defa ultValue;">
</form>

The real problem is that this still does not guarantee that the end-user
can not change the content of this input. As a result, you can NOT
depend on the value in this input when it reaches the server. For
example, if you are calculating a total price based on unit price times
the number of units, you should re-calculate that on the server, even if
you are putting it the above readonly input for the benefit of the
end-user.

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
Lando Chez wrote:
Hi

I want to create fileds on my form that can not be manually edited
through the UI of the form. Instead the (visible) content is changed
through changes on other parts of the form.
e.g. making a selection from a list changes the content of the field
mentioned above.
I don't know the html code to create such a field on my form. Can
anyone help me out?

Regards


<input readonly>

Mick
Jul 23 '05 #3
Hi

Thank you for responding. Is it possible to show the content as a lable
instead of a visible textfield box? So actually showing the content as
if it is a normal text on a form?

Jul 23 '05 #4
Lando Chez wrote:
Hi

Thank you for responding. Is it possible to show the content as a lable
instead of a visible textfield box? So actually showing the content as
if it is a normal text on a form?


<input...style= "border-width:0;">

Jul 23 '05 #5
"Lando Chez" <go********@hot mail.com> kirjoitti
viestissä:11*** *************** ***@o13g2000cwo .googlegroups.c om...
Hi

Thank you for responding. Is it possible to show the content as a lable
instead of a visible textfield box? So actually showing the content as
if it is a normal text on a form?


Here's one way:

<span id="fred_flints tone">old value</span>
<script>
document.getEle mentById("fred_ flintstone").in nerHTML = "here's the new
value";
</script>

Doing it like this, the span IS a normal text on the form, but you can
manipulate the contents of it via innerHTML.

--
"I am pro death penalty. That way people learn
their lesson for the next time." -- Britney Spears

et************* ***@5P4Mgmail.c om
Jul 23 '05 #6

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

Similar topics

2
5966
by: Iain Miller | last post by:
Now this shouldn't be hard but I've been struggling on the best way as to how to do this one for a day or 3 so I thought I'd ask the assembled company..... I'm writing an application that tracks a group of Sales people, the customers they deal with and the business they transact with them. I've got my head around all the tables & some of the basic Query structures OK and am beginning to delve into creating the forms I need to be able...
2
4390
by: Galina | last post by:
Hello I have an application in MS Access 2000. I have a form, which includes a subform. The subform is based on a table, but locked for any editing. There is Edit button. When clicked, it starts a separate unbound form with all the fields, which are on the subform. The fields are filled in with data programmatically. User edits. Edited fields are copied into fields on the subform programmatically as well. I need to catch change in one of...
5
10199
by: F. Barth | last post by:
Hello, I've posted this problem to one other newsgroups, and gotten some diagnostic help, but I still need a solution. The full text of the message box is: "The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data". This displays without a run-time error number. This error comes about when a user (I've been able to reproduce this error on 2 different workstations; one running...
10
4396
by: Deano | last post by:
I think that just about sums it up. Is there a fix/workaround for this?It's quite annoying behaviour and not user-friendly.thanksMartin
8
3300
by: Mark | last post by:
When my form goes to a new record, I have a procedure that copies the last record added to the form's underlying table into the form. The intent is that a series of new records may have the same data in many of the fields so I paste in the same values of the previous record and then edit what needs edited in the new record saving much retyping of the same data. Doing this however creates the definite possibility of creating a duplicate...
2
2482
by: Uwe Range | last post by:
Hi to all, I am working on a form with a combi-field on a subform. I want to give the user the opportunity to alter the list-content (which is based on a table) in a separate form. The user can call the edit form while the main form stays open in the background (so the user gets back to the spot / record after closing the edit form).
1
9965
by: Hozi | last post by:
I am getting the below error when asp.net tries to parse the .aspx file. The funny part is that the error only seems to be happening when viewing the page throuh IE 6 and not Netscape browsers. I am not sure exactly what is throwing it off, especially in the form tag Has anybody seen this happening to them? It worked on IE briefly and then it started happening again. Any help would be greatly appreciated Here is the full source of the...
8
3265
by: Oenone | last post by:
Is it possible to create an object which can have methods and properties, but which can also be treated as a string? I'm trying to create a wrapper around the IIS Request.Form object which behaves the same as the classic ASP object behaved. This will allow me to quickly get a large amount of code up and running (I can then tweak it to not require this wrapper at a more leisurely pace). When queried directly, this object returns a...
7
2378
by: grummanf6f | last post by:
Hello Gurus, this probably is real simple for you but for me it's a bummer. I have one table in which I have basic data collected of schools. I have another data that is detailed info on the stuff they teach in the school. I have two forms for entering the data. The first, basic info table is already filled in. I would like my second entry form to show the name of the school as
0
8709
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8952
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8909
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7791
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4395
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3081
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 we have to send another system
2
2371
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2018
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.