Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
is it possible to load JS and CSS files in JSF pages without mentioning them using <link> or <script>.
<link>
<script>
I want to dynamically load the css and js, so that I can avoid writing so much code.
getScript()
.js
eval()
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
getScript()method specifically to do this; you could read its source and use a similar technique. I believe it basically loads a.jsfile using AJAX andeval()it immediately.