View Full Version : UDM4 not working with prototype?

11-05-2008, 05:11 PM
Is there an incompatability problem when using UDM4 and the prototype framework?

Our site's been using UDM4 happily for a while now, but we are implementing the prototype javascript framework and have encountered problems. Specifically, if we load prototype.js then some of our html SELECTs start misbehaving, i.e. when the page loads the select appears correctly for a fraction of a second, then goes completely blank.

If we disable UDM4 on the page, everything works fine.

This only occurs with IE (version 7 tested), FF 3.03 does not exhibit the problem. No javascript errors reported by IE and no errors or warnings from firebug.

Any advice appreciated!!

11-05-2008, 05:50 PM
Found the problem!

If anyone ever has the same thing...

We're using the PHP generated menu script and you've got to load the prototype script in the html header and the udm4 script in the body, otherwise there's some incompatibility problem in IE (not FF).

Hope that saves someone some time one day.

11-06-2008, 09:06 AM
Sadly for me, I was talking total rubbish in my last post (blame it on late night coding). I had a typo that meant the udm-dom.php was not loading. So of course, I had no "error", and because I only had a cut down menu, I didn't notice that udm-dom.php had not loaded.

Oh well, back to the drawing board, it does seem that there is a fundamental incompatibility between udm4 and protocol. :(

If anyone has any ideas on how to trouble shoot this, I'd appreciate them.

11-06-2008, 10:37 AM
Well, I think I may have identified the issue and it may be a small bug. As protocol is used in a vast number of sites, I'm surprised that whoever supports UDM4 hasn't seen this before.

If you have a select with a css id of "size" AND udm4 AND protocol AND IE7 then the select will display blank values and your browser will return no errors. No problem with FF or Chrome, just IE.

It might be worth the udm4 developers seeing if they can "fix" this (the actual "bug" may not be in their code), or at least putting it in their documentation.

Incidently, is UDM4 a dead product or is support / development ongoing?

As a courtesy, here is the html code to reproduce the problem:-

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test tip</title>

<link rel="stylesheet" type="text/css" href="../udm4-php/udm-resources/udm-style.php" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="../CSS/prototip.css" />



<!-- PHP generated menu script [any modules or extensions must come AFTER this] -->
<script type="text/javascript"

<script type='text/javascript' src='../js/prototype.js'></script>
<script type='text/javascript' src='../js/prototip.js'></script>

<ul id="udm" class="udm" style="background-color:#FF9900">
<li><a class="nohref">withsub</a>
<li><a href="#">one</a></li>
<li><a href="#">two</a></li>
<li><a href="#">three</a></li>
<li><a href="#">nosub</a>

<form name="frm" method="post" action="./test.php">
<tr bgcolor='#FFFFFF'>
<td class="blbotx">1</td>
<td>What size is your leaflet?</td>
<select name='size' id='size'>
<option value='A6'>A6</option>
<option value='A5' selected>A5</option>
<option value='A4'>A4</option>
<option value='A3'>A3</option>
<option value='1/3 A4'>1/3 A4</option>
<td><a href='#1' id='help-1'><img src="../images/information.gif" border=0/></a></td>
<script language="javascript" type="text/javascript">
new Tip('help-1', 'content', {
ajax: { url: '../help/help.php' },
style: 'creamy',
stem: 'topLeft',
hook: { target: 'bottomLeft', tip: 'topLeft' },
offset: { x: 0, y: 0 }