Help - Search - Members - Calendar
Full Version: Problems with overLIB
Movable Type Community Forum > Additional Resources > Tips and Tricks
LisaJill
Hi all,

I have a seperate weblog for my blogroll, the code for the main index template is this:

CODE
<MTEntries lastn="999" category="blogroll" sort_by="excerpt" sort_order="ascend">
<a href="<MTEntryBody convert_breaks ="0">" onmouseover="return overlib  ('<MTEntryMore encode_xml ="1">', CAPTION, '<MTEntryTitle encode_xml ="1">');" onmouseout="return nd();"><MTEntryTitle encode_xml ="1"></a><br />
</MTEntries>


and is php included on to my main site.

As you can see, I use MTEntryTitle for the title and MTEntryMore for the description which only shows in a hover state.

If I have an apostrophe in the title or more fields, overlib doesn't.. uh, overlib.

I've tried adding encode_xml and encode_html, together and one at a time, then I tried with the decode versions. Really just desperate attempts to make it work.

In the meantime I've just posted the information without any punctuation, as I'm not sure what punctuation will stop the overlib from popping.

Anyone have any ideas on how to fix this?

Thanks. =)
TweezerMan
Since overlib is a javascript, I would suggest using the encode_js global tag attribute:
QUOTE
encode_js
When set to 1, encodes the tag value into a format suitable for usage in a Javascript string value.

CODE
<MTEntryTitle encode_js="1">
LisaJill
Thanks, that worked. Dunno why I didn't see that since I stared at the global attributes for about two hours *blushes*

Thank you again sir. =)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.