hi,
I have login page , userid and password , when i entered values into them and click browser refresh in MOZILLA , password field clears but userid field text doesnt clears, how to clear userid field. in IE both fields clears, problem is with Mozilla only. It's urgent Plz help me.
8 25634 PRR 750
Recognized Expert Contributor
you could clear the text boxes using java script -
function myfunction()
-
{
-
-
document.getElementById('TextBox1').value="";
-
-
-
}
-
<body onload="myFunction()">
-
Frinavale 9,735
Recognized Expert Moderator Expert
You could also disable ViewState for the user id TextBox.
It will not retain it's values then.
Also, you could clear the text boxes in your server code (in the PreRender event): -
myUserIdTextBox.Text = ""
-
myPassword.Text = ""
Your password field should not keep it's value though, usually this clears automatically if you have indicated that the TextBox is for a password.
If the user textbox is not clearing then u might try ds
on ur button click event,
txtUserid.Text = ""
As you've noticed, this is an issue specific to Netscape/Gecko-based browsers. When you clear the cache from the Tools menu then the issue is resolved. But by default this occurs as a result of the built-in feature called Form and Password Auto-completion.
The suggested solutions given are good, although it seems like a strange function to have to implement. Alternatively, a more precise method is to use the autocomplete attribute in either your FORM element or to each individual INPUT element: -
-
<form autocomplete="off">
-
</form>
-
-
OR
-
-
<input type="text" autocomplete="off" />
-
You can read more about it here: http://devedge-temp.mozilla.org/view.../index_en.html
Can I ask why it's imperative that you have your login page this way?
how can i clear the textfield data while click on the back button to come to old page.
Frinavale 9,735
Recognized Expert Moderator Expert
Hi :)
Welcome to Bytes.
When you hit the back button, the browser displays a version of the page that it cached. Your server-side code cannot detect this and so you cannot use C# or VB.NET code to clear the data.
You can try using meta tags to indicate that the page has expired (as soon as it's sent) and to indicate that no caching should happen. But meta tags are just suggestions and they don't work in all browsers.
The best solution that I have found is to place all of your page controls into an UpdatePanel. This will result in asynchronous postbacks to the server and the browser cannot cache this. So, when the user hits the back button, the page that is displayed is the version of the page that was sent to the browser during the first page request.
-Frinny
@ rbuczynski
Thanks MAN!
it Works ;)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Andrus Moor |
last post by:
I want to add a refresh button to my web page which works like browser
refresh button:
it must re-load current page from server.
How to implement this in javascript ?
|
by: milkyway |
last post by:
Hello to all ;-)
I am using the Visual Studio 2005 .NET framework.
Basically, I have file that is served up as an HTML file on the client
side (generated from a .aspx file). But - the HTML file is using
javascript to implement a button click (on the client side).
Ex:
<INPUT onclick="alert('about to start'); process_table('FrmX1',
|
by: tasmisr |
last post by:
This is an old problem,, but I never had it so bad like this before,,
the events are refiring when clicking the Browser refresh button.
In the Submit button in my webform, I capture the server side click
event and I update session information to track the visibilty of some
panels in a wizard type navigation ("Next >>" and "<< Back" buttons)..
but the refresh button makes another event firing and takes the whole
thing to a Choes..
...
|
by: Jaikanth Sithambaranathan via .NET 247 |
last post by:
The problem is in the result page in which i can scroll throughthe contents of the result set 100 at a time. I call the resultpage from a filter page where i accept filter on results to bedisplayed. When i get to the result page by submitting (on clickof a button) from within the filter page or result page theserver understands the calling page using Request.UrlReferrerproerty. When I refresh the page using browser Refresh button,UrlReferrer...
|
by: Navaneet |
last post by:
Hi,
Can anyone tell me how to prevent some particular POST DATA when
refresh button (F5) clicked on server side(vb.net).
Thanks
Kumar N
| |
by: sreedhardasi |
last post by:
Hi,
I would like to call a javascript function when user clicks on
browser's close button. Here is the scenario.
1. User clicks browser close button.
2. User will be displayed a popup or a div with two buttons (Yes or
No) by calling a Javascript function
3. "No" will close the window.
4. "Yes" will cancel the user action and redirect him/her to different
|
by: valhalen |
last post by:
Hi,
I am trying to redirect the user to another page (other than the previous one in the browser's history) when the browser's (IE's) BACK button is clicked. I found this snippet, but am finding it difficult in getting it to run :(
if (history.previous)
{
document.location="page_to_go_bak_to.html";
}
Could any of you please provide a small example for the code in page2 and where it should be placed (since I am a novice :))?
|
by: deeas |
last post by:
hi ,
please i have problem and need help
when i use visual basic in asp the browser cann't open it
i wish you understand me
can you help me.
|
by: rrocket |
last post by:
I have a form that has various tables that are hidden. When the user selects a number from the DDL the corresponding number of tables shows up (using javascript). When the submit button is clicked it carries the values to the next page. The issue is when the user clicks the browser back button the page only shows 1 table (default setup) and not the 3 or 4 it had when it send to the next page.
Is there a way to get the page to keep the...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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,...
|
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...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |