473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

how to turn off autocomplete using java script for Struts html:text tag

hi all,

i am using struts for my presentation and i use html:text for my text boxes

the issue is i want to disable autocomplete option for that i tried in so many different ways but it has not worked..


can any one give suggestion by writing javascript for that it is very urgent.............




pls thanku
May 18 '07 #1
6 21823
dmjpro
2,476 2GB
sorry ............. what do u mean by autocomplete????
May 18 '07 #2
acoder
16,027 Expert Mod 8TB
You can use the non-standard (I think) autocomplete attribute:
[HTML]<input ... autocomplete=off>[/HTML]
May 18 '07 #3
dmjpro
2,476 2GB
pls ACODER can u tell me what autocomplete means????

kind regards.
dmjpro.
May 18 '07 #4
acoder
16,027 Expert Mod 8TB
See this link for a quick explanation.
May 18 '07 #5
Use the below script to set autocomplete off :-
[HTML]
<script type="text/javascript">
function init() {
if (!document.getElementById) return false;
var f = document.getElementById('auto_off');
var u = f.elements[0];
f.setAttribute("autocomplete", "off");
u.focus();
}
</script>
<body onload='init()'>
<form id="auto_off">[/HTML]
Oct 4 '07 #6
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Thanks for sharing your solution. It's basically the same solution as mine except that yours does use JavaScript.

Please use code tags when posting code:

[CODE=javascript]
JavaScript code...
[/code]
Oct 4 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Cindy Lee | last post by:
This is my code, but I can't set the value for foldernames with anything other than what's in the quotes. if I try: value=<bean:write name="_bean" property="code"/> it errors, or if I put it...
2
by: bbxrider | last post by:
one of my fist asp pages i have vbscript rountines that are sending page text with response.write they are in the asp file before regular html text yet the html text appears first on the page???...
4
by: marcelf3 | last post by:
Hello, I am a novice/moderate html programmer and I wonder how to tell the browser from which start point and to which end point in the text will each page be printed. In other words, I have a...
1
by: Marek Kurowski | last post by:
Yo! I design web browser in VC++. I need a web browser, in which I can display html in a litle changed form. The best control is CHtmlView with IWebBorwser2 (do you know other way?). But in...
4
by: Ed West | last post by:
Hello Can I put generic HTML Text in a Placeholder, or does it need to be a server control? If I can't, how can I put dynamically put in some text in a template? ie, in the .ascx file ...
1
by: Filip De Backer | last post by:
Hi everyone, I have some fields from a database which contain html text. How can I show this text in an asp page (<b> must be bold, red must be red text, ...)? thanks for the answers, Filip
4
by: sreejith.ram | last post by:
What is the difference/advantages/disadvantages of using Textbox Web Control over HTML Text Box with Run at Server? I could'nt figure out a convincing answer. I was testing it this morning.. I...
10
by: AussieRules | last post by:
Hi, Anybody know of a really good HTML text box. I want my user to be able to enter text(WYSIWYG mode) and then I can save the basic html. Any thing free of course would be really good! ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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
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...

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.