Showing posts with label jquery. Show all posts
Showing posts with label jquery. Show all posts

2024-04-19

Expand all codes' textboxes in html, to be saved in local.


csdn.net

Expand all codes' textboxes in html, to be saved in local.



$( ".look-more-preCode" ).each( function(index){
console.log( $( this ).parent().parent().parent().data( "index" ) );
$( this ).click();
});


















jQuery tick all checkboxes by jQuery selector by id start with








$( "[id^=MainContent_ddlLeaveType_]" ).each( function(index){
console.log( $( this ).attr( "id" ) );
$( this ).prop( "checked", true );
});

















2022-08-01

Keycloak 18.0.2

 

HTTP Error
302
401
500

clientId missing

solved by changing json config from installation as below

from:

  "auth-server-url": "http://localhost:9000/",
  "ssl-required": "none",
  "resource": "localsfaportal",

to:

  "url": "http://localhost:9000/",
  "ssl-required": "none",
  "clientId": "localsfaportal",



       [KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead.

resolved by changing init javascript

from:
keycloak.init().success().error()

to:
keycloak.init().then().catch()

has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.



Solved by adding * as print screen below:
















2022-07-21

Jquery Datepicker: click on a checkbox, then open/pop datepicker of a textbox.

 


click on a checkbox, then open/pop datepicker of a textbox.



if($("#chkHasDateTo").is(":checked")){
$( "#dateTo" ).trigger( "select" );
$( "#dateTo" ).trigger( "focus" );
}

















Google Referrals