vijay1440 Posted May 7, 2008 Share Posted May 7, 2008 Hi All!In dojo toolkit I found that they are embedding widgets in HTML by custom HTML Attributes like below,<DIV dojotype="Titlepane"></DIV>Where the dojotype Attribute for the Div has been added by the DOJO. And by adding that attribute, that div has become Movable, resizable..etc. And the styles are also applied to that div. I would like to request you all to please let me know if you know how this could be achieved. Thank you all in advance,Vijay Link to comment Share on other sites More sharing options...
Ingolme Posted May 7, 2008 Share Posted May 7, 2008 It's not valid HTML, but you can always tell Javascript to perform actions on elements that have a certain attribute, which is most likely what that's for.Of course, to make it movable and resizeable you're going to have to write the script that moves and resizes it, which is a complicated job. Link to comment Share on other sites More sharing options...
vijay1440 Posted May 8, 2008 Author Share Posted May 8, 2008 Hi Ingolme!Thank you very much for Your suggestion. Can you please let me know how to suggest the javascript to take some action when it encounters a user defined attribute?Once again, thanks a lot for your response.Thank you,Vijay Link to comment Share on other sites More sharing options...
Synook Posted May 8, 2008 Share Posted May 8, 2008 window.onload = function() { tag = document.getElementsByTagName("tag"); foreach (x in tag) { if (tag[x].getAttribute("attribute") != null) { takeAction(tag[x]); } }} Link to comment Share on other sites More sharing options...
vijay1440 Posted May 8, 2008 Author Share Posted May 8, 2008 Hi Synook!Thank you very much. Though I was already familiar with that method document.getElementsByTagName, i did not get this idea.Once again, Thank you very much.Are there any other approaches as well? Please respond if you know any.Best regards,Vijay Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.