View Single Post
Old 05-30-2012, 05:36 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,058
Quote:
Originally Posted by raymor View Post
As uniqumkt said, this has as much to do with Java as automobile has with bile. The two words have some of the same letters, and are completely unrelated.

What you want to do is before the event loop add
var i = 0;
In the loop, add
if ($i++} { continue; }

That will print only one error message. I can't actually read your code on my phone, but the screenshot tells me what the code must be.
He isn't doing a loop. (or he isn't showing it to us).

He is inserting the error message just before the parent object thus everytime he gets an error it is inserting a new line above the parent. At least that is the way I am reading it.

But as usual we are not seeing all the code in play here, so I can't say for sure.

As far as where the error message goes and your repeating messages, Myself, I would create a div in the html called error_div or something like that and on each error I would rewrite the div inner HTML. That way the error message always shows in the same spot and doesn't screw the layout and only one error message shows at a time.


.
__________________
All cookies cleared!

Last edited by sarettah; 05-30-2012 at 05:48 PM..
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote