Two notes about JQuery (combining the grid scroll bar of Extjs and using the form plug-in to submit the form)

Source: Internet
Author: User
When I was writing a program yesterday, I used the gridpanel of Jquery and Extjs and found that the scroll bar of the gridpanel was rolled in anyway .. Later, the dynamic data was changed to static data, and the problem was finally solved. But the specific reason is not clear yet. Write out the solution... SyntaxHighlighter. all ();

When I was writing a program yesterday, I used the gridpanel of Jquery and Extjs and found that the scroll bar of the gridpanel was rolled in anyway ..

Later, the dynamic data was changed to static data, and the problem was finally solved. But the specific reason is not clear yet. Write out the solution for future use.

 


/**
* The first tab is selected by default.
*/
$ (Function (){
ShowBackRole ();
Change_option (1 );
});

 

 

ShowBackRole (); loads data into the GridPanel of Extjs.

Change_option (1); is to activate the first tab (place GridPanel In the second tab)


According to the above Code, it can be correctly executed, but if you put the two methods on hold for replacement, then the scroll bar will not display. I printed the GridPanel height and found no error.

The specific cause is not found, but the problem is solved.

 


Today, I encountered a problem when I used Jquery to write a form for submission. I used Jquery. form. js, the official jquery plug-in, to submit forms asynchronously using AJax.

 


/**
* Parameter settings
*/
Var options = {
Url: path + "user! AddBackRole. action ",
ContentType: "application/x-www-form-urlencoded; charset = UTF-8 ",
BeforeSubmit: beforeSubmit,
Success: afterSubmit
};

 


However, if I am in beforeSubmit, assign a value to a control in the form: $ ("# selectIds "). val (valueString), a null value is obtained in the action at the time of submission. I personally think it's a bug,

Therefore, we can only put it honestly in the save method of js to assign values.

 

 

 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.