It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Java Script Focus issue!!

Java Script Focus issue!!

Postby satyendra_dhar on Wed Nov 26, 2008 12:19 pm

Hello Friends,

I have a html form with some 2-3 input fields.
After providing the input on all the fields i am triggering a submit to the next form.

Note: submit is not the html submit btn. I have put one logic, using that when i am pressing a key-1 of my keyboard this submit is happening.

Problem: When i submit this form with pressing the key-1, the data of last input field is not going with the reuqest, and can't be read in next form, as input field is not loosing the focus.

I want to remove the focus from the last input field.
Can any one help me here.

Thanks & Regards,
Satya.
satyendra_dhar
 
Posts: 3
Joined: Wed Nov 26, 2008 9:23 am

Postby rangana on Wed Nov 26, 2008 1:05 pm

Have you tried to add blur event on the last input element when the form is submitted?
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Java Script Focus issue!!

Postby satyendra_dhar on Thu Nov 27, 2008 5:52 am

Hi,

Thanks for such quick responnse.

Do you mean... document.activeelement.blur();
if yes then it is only supported on IE.. i am looking for a generic solution.

Regards,
Satya
satyendra_dhar
 
Posts: 3
Joined: Wed Nov 26, 2008 9:23 am

Re: Java Script Focus issue!!

Postby rangana on Thu Nov 27, 2008 9:02 am

Who says it's only supported on IE? :roll:
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Java Script Focus issue!!

Postby satyendra_dhar on Thu Nov 27, 2008 4:30 pm

i have read some document!!! well and dindn't work on my case...any othe solution if you can provide....
satyendra_dhar
 
Posts: 3
Joined: Wed Nov 26, 2008 9:23 am

Re: Java Script Focus issue!!

Postby rangana on Fri Nov 28, 2008 2:21 am

Could you show me the code you have and if you can, the document you've read.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines


Who is online

Users browsing this forum: No registered users and 5 guests