jahlxx Posted November 23, 2021 Share Posted November 23, 2021 Hi. How can I load customcss in run time? I can't find info about this. I load a custom.css file in servermodule init, but I don't know how can I do it in run time. Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 23, 2021 Share Posted November 23, 2021 16 minutes ago, jahlxx said: How can I load customcss in run time? Hello, Search the forum with the Ext.util.CSS keyword. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted November 23, 2021 Author Share Posted November 23, 2021 Sorry. Taking this: UniSession.AddJS('Ext.util.CSS.swapStyleSheet(''/ext-4.2.1.883/resources/css/ext-all-gray.css'',''/ext-4.2.1.883/resources/css/ext-all.css'');'); How can I load UniServerModule.StartPath + 'files\custom.css' ? Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 23, 2021 Share Posted November 23, 2021 2 hours ago, jahlxx said: How can I load UniServerModule.StartPath + 'files\custom.css' ? You can try this approach for example: Quote Link to comment Share on other sites More sharing options...
jahlxx Posted November 23, 2021 Author Share Posted November 23, 2021 Ajax error with this: UniSession.AddJS('Ext.util.CSS.swapStyleSheet({url: "'+UniServerModule.STartPath+'files\custom2.css'+ '"})'); Ajax error: malformed hexadecimal character escape sequence Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.