Online Promoters™ :: Web Development made simple

Blog

Prototype IE7 error – evalScripts crash

Let's assume that you load some content - that contains javascript code - into a div using prototype's Ajax.Updater. You may want that javascript code, from the ajax response, to be evaled. So, you would do something like: [sourcecode language="js"] <script language="JavaScript" type="text/javascript"> new Ajax.Updater('the_div_id','/php_page',{evalScripts:true, onFailure: show_error}); </script> [/sourcecode] The error thrown by IE7 ironically is generated by the comment lines :[sourcecode language="html"]<!-- ... //...

by Webmaster

Limit text with jQuery – text limiting – show more …

I needed to limit some longer texts on one of the sites I currently develop and I came with the following solution. I started from the original script made by Renso Hollhumer. If you do improve this script please write a comment with your link to the page where you have posted it. You put this in : text_limit_plugin.js [sourcecode language="js"] (function($) { $.fn.TruncExpandText =...

by Webmaster

Get href of a link with jQuery

Ok. Here you have it plain and simple: [sourcecode] var url = $('#LinkID').attr('href'); alert(url); [/sourcecode]

by Webmaster