0

Change default position of Error box

asked 2010-04-12 04:53:15 +0800

Neus gravatar image Neus
1415 14

Hi,

How can I change the default position of thew WrongValueException box?

delete flag offensive retag edit

9 Replies

Sort by ยป oldest newest

answered 2010-04-12 11:06:29 +0800

Neus gravatar image Neus
1415 14

<script type="text/javascript"><![CDATA[
//Running at the browser
window.Validate_errorbox = function (id, boxid, msg) {
var html = '<div style="display:none;position:absolute;background-color:blue" id="'+boxid +'">'+zk.encodeXML(msg, true)+'</div>';
document.body.insertAdjacentHTML("afterbegin", html);
return $e(boxid);
}
]]></script>

I have found this code to overwrite the errorbox but I don't know how to use it.

Can anyone help me?

link publish delete flag offensive edit

answered 2010-04-14 11:21:29 +0800

Neus gravatar image Neus
1415 14

Ok,
I have found this:

.z-errbox.z-popup{
position:absolute;
left:540px !important;
}

but this position the error box in a fixed position (always 540px from the left). Is there anyway to position it in the left side of the component with the constraint?

link publish delete flag offensive edit

answered 2011-01-25 03:12:36 +0800

moloch gravatar image moloch
606 1 13

i have the same problem, should anybody help please?

greets

link publish delete flag offensive edit

answered 2011-02-09 09:44:14 +0800

iantsai gravatar image iantsai
2755 1

ZK Error Handling is the last line to tell you the error.

Normally, you should handle it in your way.

I'd much prefer to have a popup Window which can print a more detailed info that I want.

link publish delete flag offensive edit

answered 2011-05-15 22:49:38 +0800

rosjoss gravatar image rosjoss
9

Hey Neus, did you get it? Now I have the same problem.

Greets

link publish delete flag offensive edit

answered 2011-05-18 09:09:16 +0800

Neus gravatar image Neus
1415 14

Nop, didn't get it yet. But I found this http://sourceforge.net/tracker/?func=detail&aid=3218780&group_id=152762&atid=785194 It seems that it has been solved but I didn't tested it yet

link publish delete flag offensive edit

answered 2011-05-18 12:44:10 +0800

mikelara gravatar image mikelara
144
www.mextisa.com.mx

hi @Neus have you tried to use position: relative ? in your snippet

.z-errbox.z-popup{
position:absolute;
left:540px !important;
}

link publish delete flag offensive edit

answered 2011-05-19 00:29:39 +0800

rosjoss gravatar image rosjoss
9

updated 2011-05-19 00:56:53 +0800

Hello, the problem was solved in the new 5.0.7 version
http://www.zkoss.org/release/rn-5.0.7.dsp
at line
3251564: Position of constraint message (error box)

you can try it in the sandbox, in my case the problem was solve. Although, I think that it could be nice to set the position in the place that you prefer.
Greetings

link publish delete flag offensive edit

answered 2011-08-07 03:38:50 +0800

Djbhuva gravatar image Djbhuva
27

@rosjoss,
I have this kind of problem, i have added constraint on textbox. when user enters some wrng value, it shows error box showing value mismatch. after that when i scroll my page, error box should moves up with text box. but it get fixed there. it should moves up with that perticular textbox.

kindly tell me what should be the solution?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-04-12 04:53:15 +0800

Seen: 960 times

Last updated: Aug 07 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More