Connecting Tech Pros Worldwide Forums | Help | Site Map

Reusable HTML, does it exist? (Like the Scriptlet)

Newbie
 
Join Date: Aug 2008
Posts: 3
#1: Sep 10 '08
Hello, I'm investigating how HTML can be componentized and reusable. Remember Microsoft's SCRIPTLET object (TYPE="text/x-scriptlet")? I thought this was a great invention. But other browsers do not support it! I'm not even sure the latest IE will even support it.

I have custom html ui blocks that I want to place many times on a screen. Like custom text fields, custom buttons, and other custom ui elements coded in HTML (that are browser aware). I am familiar with server side solutions (ASP.NET user controls & server controls), but is there any technique/approach not dependent on the server?

Are there any alternatives? New XHTML features, anything?

eWish's Avatar
Moderator
 
Join Date: Jul 2007
Location: Arkansas
Posts: 900
#2: Sep 10 '08

re: Reusable HTML, does it exist? (Like the Scriptlet)


I believe that your only option is going to be server side which can handle this dynamically for you. Unless you can use some Ajax, not sure on that one.

--Kevin
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,648
#3: Sep 10 '08

re: Reusable HTML, does it exist? (Like the Scriptlet)


Quote:

Originally Posted by eWish

Unless you can use some Ajax, not sure on that one.

it is possible, but you have to use XML (import XML → (DOM) → HTML) otherwise you have to parse the markup by regular expressions which will result in a lot of code.
Reply