473,549 Members | 2,390 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 1766
"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
5961
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...
2
4374
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...
5
10191
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...
10
4374
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
3270
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...
2
2479
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
9959
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...
8
3260
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...
7
2370
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...
0
7740
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. ...
0
7985
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7503
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...
1
5387
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5111
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3517
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...
1
1962
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
1
1082
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
784
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...

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.