20090626
Javascript calls the parent window (parent page) Method
Differences between window. Parent and window. Opener JavaScript calls the Main Window Method
1: window. parent is the parent page object called by the IFRAME page
2: window. opener is a child page opened by window. Open. It calls the parent page object.
The specific example will not be written.
Client verification of aspxbutton in devexpress. Web Control
When we use the. NET default aspbutton for face-to-face page submission, we usually need
This can be written as follows:
View plaincopy to clipboardprint?
- <Asp: buttonId = "btnsubmit" runat = "server" text = "Submit" onclientclick = "Return btnclick ();"/>
<Asp: button id = "btnsubmit" runat = "server" text = "Submit" onclientclick = "Return btnclick ();"/>If the verification fails, return false directly in the JS function validate, but aspxbutton does not,
It takes a lot of effort to find the appropriate method, as shown below:
View plaincopy to clipboardprint?
- <Dxe: aspxbuttonId = "btnsubmit" runat = "server" clientinstancename = "btnclientsubmit"
- TEXT = "Submit">
- <ClientsideeventsClick = "function validate (S, e ){
- If (txtmemo. gettext () = ''){
- Alert ('enter a valid value! ');
- E. processonserver = false;
- Return false;
- }
- }"/>
- </Dxe: aspxbutton>
<Dxe: aspxbutton id = "btnsubmit" runat = "server" clientinstancename = "btnclientsubmit" <br/> text = "Submit"> <br/> <clientsideevents click = "function validate (S, e) {<br/> If (txtmemo. gettext () = '') {<br/> alert ('enter a valid value! '); <Br/> E. processonserver = false; <br/> return false; <br/>}< br/>}"/> <br/> </dxe: aspxbutton>
In this event, processonserver is a very important attribute. By setting the value of this attribute (true/false), aspxbutton can execute its event programs on the server side.
Processonserver:
True: handles server-side events;
False: Process events on the client.
Remarks
E. processonserver = false: gets or sets a value to determine whether the program is executed on the server.
You can also say that if the control has the autopostback attribute, you can use E. processonserver to control whether the code is executed on the client or on the server. However, processonserver ultimately depends on the autopostback attribute. If the control autopostback = "false", the processonserver attribute value will not work.