Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Force onblur event

Posted on 2006-10-27
4
Medium Priority
?
1,196 Views
Last Modified: 2006-11-28
I have a window and an iframe. In the iframe there are text fields that update using the onblur event. If I click anywhere in either of the windows everything works as it should but if I click a nav button, the script doesn't have time to run. I have considered putting a timer on the nav buttons but that would add an unnessary delay to normal use. My other thought is to force the onblur event somehow when the mouse is exiting the iframe or moving over a div.

Any ideas would be greatly appreciated. Thanks!
0
Comment
Question by:dBedient
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Accepted Solution

by:
gangwisch earned 500 total points
ID: 17820672
i have had the same problem before and what i do is just change the text of the button or change the image to say 'Loading..." also you can change the cursor to an hour glass so the user understands. Another idea would be to have an onclick event on your nav button and after everything is done updaating window.location.href over to where you need to be

Good Luck.
0
 
LVL 23

Assisted Solution

by:rama_krishna580
rama_krishna580 earned 500 total points
ID: 17822309
Hi,

try this..
<html>
<head>
<title>demo</title>
<script type="text/javascript">
var globalTakeFocus=null;

function setFocus(ref) {
globalTakeFocus=ref;
setTimeout("globalTakeFocus.focus();globalTakeFocus.select()",100);
}

function validateField(ref) {
if (ref.value != "ok") {
alert("Value must be \"ok\"");
setFocus(ref);
}
}
</script>
</head>
<body>
<form>
<input onchange="validateField(this)"><br>
<input onchange="validateField(this)"><br>
<input onchange="validateField(this)">
</form>
</body>
</html>

R.K
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question