A Note Regarding YUI and the WebImageViewer

Published 21 July 08 08:50 AM | jacobl 

When developing two of my applications for 31 Apps in 31 Days (here and here), I discovered an issue with using YUI with our WebImageViewer. The script tag that references the YUI js files must be inside the main form element. If it is not, the DOM of the WebImageViewer gets distroyed and multiple painful errors ensue.

<html>
...
<body>
...
<form ...>

<..WebImageViewer .. />

 

<script type="text/javascript" language="javascript" href="yui-script.js" />
<script type="text/javascript" language="javascript" href="other-yui-script.js" />
<script type="text/javascript" language="javascript">

 // Your JavaScript Goes Here ...

</script>

</form>

...

</body>
</html>

This may also be the case with other third party javascript libraries. I have experienced receiving a similar error when using ExtJS, but didn't try this fix at the time.

Filed under: , , , ,

Comments

No Comments
Anonymous comments are disabled