aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes window focus Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "window focus" Watch "window focus" New topic
Author

window focus

somin bhuvan
Greenhorn

Joined: Jun 01, 2005
Posts: 22
Hi,

A problem in javascript,

There is a textarea with onblur event.

Am checking for maxlength of characters which shud accept only 255 characters and not more than that. If it exceeds it will throw an error in alert box. My problem is, when i give the characters more than 255 characters and i give the focus to another window like Worpad,Notepad and if i again go to the samepage of the webpage, it throws the error says the pls enter within limit of 255 characters and if i click ok, again this alert box alerts infinite time and it doesn't get stopped.

I donno how to solve this problem , how to bring focus to this window and stop the alert message after clicking ok button in that alert box. pls help me.

Thanks in advance
bhuvan
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

This is a javascript issue and not a JSF issue. Moving to HTML and Javascript...
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
you need to refocus the window

basically

onblur="alert('error');this.focus();"

Eric
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: window focus
 
Similar Threads
org.apache.jasper.JasperException: java.lang.ArrayIndexOutOfBoundsException: 8
How to get the first 255 characters?
What is the maximum limit of data can be send to the sever using GET method???
Date comparision
onBlur problem?