• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript with JSF(.xhtml)

 
David Lidz
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ive been trying to create javascript for xhtml pages but I just cant. The scripts work perfectly on html pages but I cant get them to work on xhtml pages.
Is there soemthing im missing? I presume that javascript has to be declared differently on xhtml pages.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you actually mean is that you're having problems with Facelets. Your best bet is to embed the JavaScript in "verbatim" tags. Or even better, put the JavaScript in its own file and have the xhtml view do an "include" of that file.
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even better, actually post up what doesn't work.
 
Tuna Töre
Ranch Hand
Posts: 220
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the code below for your JavaScript codes inside .xhtml pages



Tuna TÖRE
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic