Google Blogoscoped


When Your Input Gets Erased On Page Load  (View post)

Ionut Alex. Chitu [PersonRank 10]

Monday, February 26, 2007
12 years ago5,323 views

I hate this. I really hate this. That's I use Google toolbar or the built-in search box.

Teodor Filimon [PersonRank 3]

12 years ago #

Yes, i do that too :) pretty annoying when that happens, i've also seen it on . Let's hope they're reading this..

Tony Ruscoe [PersonRank 10]

12 years ago #

This is something that really annoys me too.

The way Blogger is using JavaScript redirecting when entering comments is just primitive. (I think they're doing this to sign you in to your Google Account.) I guess I should learn not to be so quick in typing my comment... but I also shouldn't have to!

mak [PersonRank 5]

12 years ago #

JS developers need to make a "workaround" for this, ie: in their body onload function, by detecting the content/value of the text field.

The browser, in my opinion, did its work good enough. At least you can refresh a page or go back to a form and see your input back in the form fields.

David T [PersonRank 7]

12 years ago #

Yeah this is definately annoying, it's always a delight when boxes don't do this!

spugbrap [PersonRank 0]

12 years ago #

Yeah, that's even more annoying than login pages that use javascript to focus the username field (which is nice), but they do it in the onload event handler. By the time the page has loaded, I've already typed my username, and am half-way through typing my cryptic password, when the cursor is moved back up to the username field.

In both of these cases, I think it sometimes helps to put the script code at the bottom of the page, so it gets executed after the page's main content is loaded, but doesn't wait for all images/elements to load (like the onload handler does).

Niraj Sanghvi [PersonRank 10]

12 years ago #

I think mak has the best solution...use onload in conjunction with a check on the contents before just wiping them out or shifting focus. The same method could also resolve the login page annoyance which I also encounter (and get annoyed by) regularly.

Analogpoint [PersonRank 1]

12 years ago #

I fully agree with Niraj. In the onload handler, it would be trivial to check if the username box is empty before shifting focus to it. If there's something already in the username box, don't do anything.

Martin [PersonRank 0]

12 years ago #

The google result page does this as well. <body onload=";

Has been very annoying when I used dial up. The result page is loading, I notice a mistake, start to change it, and whoops, Google resets the search field to the original value.

A simple "if ( ==;" is all there needs to be done to fix it.

I even reported this to Google on 2005-08-11, report id #31494059.


there is a very annoying feature on the google search result pages.
Onload of the page, the input field gets reseted via javascript. [...]

Hi Martin,

Thank you for your note. We understand your concern. You can avoid
receiving script errors by returning Microsoft Internet Explorer's
Advanced Settings to their default configuration. To make this change,
please follow the steps below: [...]

I followed up by explaining that this is not the problem and reexplaining the problem.

Thank you for your reply and additional information. We apologize for the
confusion. We don't currently offer a feature that allows the removal of
the onload script of the body tag on search results. We appreciate your
interest, and we'll keep it in mind as we work to improve Google.

The Google Team


Well at least they answered very fast (1 day wait), kudos for that. But I still do not see any value in the reset() for the user whatsoever, only annoyance.

Martin [PersonRank 0]

12 years ago #

Thinking again about this, completely removing the line is the correct fix, not the if clause, because reseting when defaultValue==value does not change a thing. The reset() does not focus the search field.

I would be delighted to hear from a Google engineer why the reset() adds value for the user. Quite possible I am missing something.

Philipp Lenssen [PersonRank 10]

12 years ago #

> You can avoid receiving script errors by returning
> Microsoft Internet Explorer's
> Advanced Settings to their default configuration.

Sheesh what a clueless answer from Google support. I often have similar experiences with Google support in the past. They seem to be handing out dumb answers to dumb questions all day long so every smart or only semi-dumb question throws them completely off-track.

I recently asked Google AdSense support whether or not AdSense supports content negotiation, because I have the same page delivered in different languages depending on the HTTP language accept header the user agent sends. And what does Google reply? "Please keep in mind that the crawlers used by Google AdSense index content by URL. Therefore, we deliver Google ads to a web page based on the content on the page at the time it is crawled." etc. etc. followed by more paragraphs completely ignoring content negotiation or the question at hand. I had to send off a second mail explaining that yes, but my single URL delivers different content depending on the user language, and the second time they understood the question and replied with the real answer (no, content negotiation is supported in no way). Then again, their support is free, so I guess you get what you pay for...

On the issue at hand, I don't know why Google thinks they need this specific input area fiddling in the first place (e.g. in Google Image search, why not just prefill the input box value with HTML), but if they do need it, there's easy ways to make it not collide with entered user text. (I do this here in the forum when I load the forum name from the cookie to prefill the value.)

J.P. [PersonRank 1]

12 years ago #

Google Spreadsheets barely works at all because of some bug similar to what you describe. I can't use G-Spreadsheets with IE, it's too buggy when making data entries. Firefox works better, but I'm kinda irritated that I have to open Firefox just to use Google Spreadsheets, this is ridiculous. So score up another small win for MSoft, as they've figured out another small way to foil their competition.

Has anyone else noticed problems when trying to enter data into Google Spreadsheets?

I also think Google Toolbar isn't the greatest with respect to this either. Sometimes you are typing in that little box, and it gets all messed up. Heck, many times my cursor won't even go into the google search bar (on the toolbar) box at all, it just ignores me. Makes me really angry.

I don't see any way around Google eventually developing their own browser, and eventually thin-client machines. If they don't do this, they will be "f---ked" with for the rest of their days by the owners of browsers (Firefox, IE, Apple) and operating systems (RedHat, MS, Apple). When building an online software model like Google is doing, it only makes sense to develop a simplified OS+Browser combo which optimizes Googles many pieces of software. Frankly, my computers are getting pretty bogged-down by all the Google-ware. You now have Toolbar, Video, Earth, gmail notifier, G-talk, and Accelerator all competiing for DRAM and CPU time. It's getting nasty frankly, and google is crazy if they think MSFT is going to care if Google stuff ain't working right.

C.D. [PersonRank 1]

12 years ago #

I've noticed that it's also happened in Google Calendar – if you try to create a new event while your other calendars are still loading, it erases the event that you've already started typing. Annoyoing.

xeen [PersonRank 1]

12 years ago #

Hmm... given every byte of Google's page count, why would they include something this useless? I mean, they even strip whitespace, so wasting like 30 bytes or so for nothing (but annoyance)?. Let's speculate what the reset method is or _was_ supposed to do (probably Mosaic 1.0 support).

I've asked the author of the "Customize Google" extension if he/she'd was so kind to include a feature to disable these events, but I didn't get an answer so far and it hasn't been included in any updates as far as I know. It's even more annoying when using e.g. "Better Search" and having thumbnails displayed on the left. Since I dropped BS because I found the thumbnail feature to be 'cool' but useless the situation is better, although I still don't get Google's reasons for this. Like I said, let's speculate :)

Hong Xiaowan [PersonRank 10]

12 years ago #

Can make the JS at the top of the page?

JohnMu [PersonRank 10]

12 years ago #

(offtopic)Uhm, Philipp, how should content negotiation work for Adsense?
"Please keep in mind that the crawlers used by Google AdSense index content by URL. Therefore, we deliver Google ads to a web page based on the content on the page at the time it is crawled."
is the answer that you need :-).

That said, I have my share of clueless questions and answers ... Google seems to at least react quite quickly when you reply to a canned answer.

Did anyone see how Google Groups now handles it? I stumbled over it today – start a reply to a thread (it uses javascript to open a reply-box) and then hit refresh – it'll keep the box with the text you have written so far.

Avinash [PersonRank 0]

12 years ago #

Though I have never experienced this type of problem with Google Image Search, I do hate it when I've completed writing two or three lines in a comment box and all the texts suddenly disappear!

Google needs to fix this.

Philipp Lenssen [PersonRank 10]

12 years ago #

> Uhm, Philipp, how should content negotiation work for Adsense?

Google's user agent could theoretically spider different languages by sending different language-accept headers, and then they could deliver different AdSense (themed to the different translations of the page) based on a visitor's accept-languages. Or something like that. I didn't think it was very realistic for Google to do this but I wanted to be 100% sure, so I contacted Google support...

This thread is locked as it's old... but you can create a new thread in the forum. 

Forum home


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!