defaulting fields in web pages

January 24, 2020 at 06:26:53
Specs: Windows 10, 8GB
My question is this:
Is it possible to have control over the content of a given field in a given web page, in order to default the value of it to whatever value. Or, to one of the values which are actually listed in a pre-defined list of values.

Why I think it is possible: when you use the "completion" function of a browser, for user and password usage, how else would your browser know what account name to provide into any field at all. He must know some context of that field, like: this is the "user" field of page X in web page Y.

So, if this is possible, it could also be possible for any other field. That is, recognizing a field. Subsequently, you could tell your browser to fill that specific field, with a specific value.

I have some case in mind, one of them is a free text field (no user or password), which would be nice if it would be defaulted with a given value, on every occurance of landing on that page.

Secondly, I'm thinking of a field that has a List Of Values on it, but the default value - the first one alphabetically - is just not the wanted value, I'd prefer another value to be chosen by default instead.

So, think kind of solution is dependant of the browser, and obviously also from the actual code (language) it is written in. Obviously, I'm just a user, and I can't control the actual code. But I can control my browser.


See More: defaulting fields in web pages


#1
January 24, 2020 at 08:10:49
Assuming the page is written with a scripting language - which almost all are - it is trivial to set default values for the various fields.

Report •

#2
January 25, 2020 at 06:00:16
I'm focusing on one application only, I do not need to support all scripting languages in the world. I just don't know what language it is, but it is a widely used one.

It's probably JavaScript

message edited by Looge


Report •

#3
February 27, 2020 at 05:56:37
No solution for this, but I'm sure a feature like this may exist in some browser. Maybe one that needs to be developed still. If the browser can link info (passwords for example) against any field, why would you not be able to link other information (default values) to a field chosen yourself. The code that is behind this field, may be the biggest problem though.

Report •

Related Solutions

#4
February 27, 2020 at 16:18:00
Looge,

I haven't ever done any programming exactly like you are
doing, but I know enough about programming in general to
agree with ijack that what you want to do is trivial.

Maybe if you can describe in more detail what the situation
is, I can help you, or you will figure it out yourself. I often
find that just trying to explain a problem solves it.

Please start at the beginning: Is this your web page, that you
are designing from scratch, or are you a user of the web page
that you want filled in with defaults when you browse to it?

-- Jeff, in Minneapolis

message edited by Jeff Root


Report •

Ask Question