PDA

View Full Version : images with text field



Alidad
01-09-2007, 01:06 AM
I have 3 text field for user name, password and email. there is small image on next to the each text field.

When person enter first text field for the user name then when press tab or return then it will change first image of first text field before go to the next text field.

my question is that is there is way to write in code with in CSS and javascripts!

I'm trying to figure out I could not get anywhere.

Alidad

djr33
01-09-2007, 01:33 AM
It's possible to do this. It would likely be something along the lines of a complex mouseover change (based on the text field).

However, how do you want to change the image? Do they enter a keyword? (like 'sky', and a picture of the sky shows up) Do they enter a URL for the image?
Etc.

Alidad
01-09-2007, 02:29 AM
thank you so much for your help, no i do not wish to have mouse over but when person press (tab or enter) to go to next text field is all i need but not any other keyword.

The forms is for sign up for new member and there is images next the each text field, and let say that first text field for first name that showing a two person images icon (man and woman) then when person enter the first name and press key (tab or enter) to go next text field for last name, during that it will automatic change icon image of first text field to check mark images meaning that first text filed is fill go on next one. and do samething each for each text filed using css and javascripts.

i appreciation your help thanks.

AM

djr33
01-09-2007, 02:48 AM
I know you don't want mouseover, but I am saying it is similar because an image changes. The code would be similar too. Instead of using "onMouseover=", you could use "onBlur=" for the form field and do basically the exact same thing.

So the whole point of the images is to say "this field has something in it"? Makes sense.

Yeah, really, this is exactly like a mouseover image, but just use onBlur for the field which makes it change like that.

You could add, "if (this.value != '') {mouseoverfunctionhere();}"