PDA

View Full Version : Form Dependency Manager



NGJ
03-04-2007, 11:21 AM
Form Dependency Manager

http://www.dynamicdrive.com/dynamicindex16/formdependency.htm

This is a great script and I use it all the time :)

I have come across a problem with it when used in conjunction with another script - called Nifty Cube .... a useful script for rounding 'div' boxes on the page... http://www.html.it/articoli/niftycube/index.html

Anyway, when used with Form Dependency Manager - NiftyCube no longer 'rounds' the divs on the page. I cannot see any obvious duplicate var names used & I think the FDM .js is protected anyway.

Anybody got any ideas?

Thanks in advance,

N.

Twey
03-04-2007, 01:13 PM
I suspect an onload conflict.

NGJ
03-04-2007, 05:43 PM
Looking at it .... I suspect you are correct! ;)

I have two onload calls:

<script type="text/javascript">
window.onload=function() {Nifty("div#container_big","big");}
</script>


<script type="text/javascript">
window.onload = function() {setupDependencies('myForm');};
</script>

Can you suggest a way around this please?

Twey
03-04-2007, 05:44 PM
Yes, remove one and set the other to:
<script type="text/javascript">
window.onload = function() {
setupDependencies('myForm');
Nifty("div#container_big", "big");
};
</script>

NGJ
03-04-2007, 06:09 PM
Excellent.
It's now working properly .... I got mixed up with too many {}'s in my attempt !! :p

This has also highlighted (again) how I should get around multiple onloads - thank you! :)

N.