Bug report (I think) - Net Objects Fusion
This is a discussion on Bug report (I think) - Net Objects Fusion ; Hi All,
I presume this is not the right place to report bugs, but I can't seem to
login to the support.netobjects.com site, so hopefully there's someone here
who can do something with this.
I am not personally a NetObjects ...
-
Bug report (I think)
Hi All,
I presume this is not the right place to report bugs, but I can't seem to
login to the support.netobjects.com site, so hopefully there's someone here
who can do something with this.
I am not personally a NetObjects Fusion user, and I'm somewhat new to
Javascript, so forgive me if the following is lame, or completely off the
wall.
I've been asked to add an Ajax component, based on prototype.js, to a page,
in a web site, created with
NetObjects Fusion. While doing this I encountered an endless loop, which
caused me to dive into the JavaScript.
I found 2 places in the file rollover.js (and I suspect there are more)
where some additional code is necessary.
The top of the rollover.js file reads :
/**
* Fusion 8 DHTML Menus
*/
The first change I've made is to the hideMenuItem function
this.hideMenuItem=function hideMenuItem(item){
if(typeof(item)=="string")
item=this.getItem(item)
if(item==null||typeof(item)=="undefined"||item==""||typeof(item)=="number"||typeof(item)=="function")
return;
item.style.visibility="hidden";
}
All I did was add the bit
||typeof(item)=="function")
Also later on, in NOF_OpenedItems(), a similar test
this.removeItem=function removeItem(item){
if(item==GLOBAL_CurrentItem)
return;
if (typeof(item)=='function')
return;
Both of these test are necessary (as far as I can see) because prototype.js
creates functions on the fly (this bit is way beyond my javascript skills)
and they then crop up in this bit of the NetObjects code...
for(var i in itemsList)
if(itemsList[i]&& itemsList[i].length){
GLOBAL_items.removeItem(itemsList[i]);
GLOBAL_Hide[i]=browser.hideMenuItem(itemsList[i]);
}
which is in the HideMenu function.
I see many other functions in therollover.js file that take "item" as a
parameter, some test the typeof(item), some don't. But I suspect that in
many cases if it is typeof(function) then it should probably skip over it.
those changes though I'll leave to you.
I'll try again later to log into the support site, and report this there.
Comments of course welcome.
Cheers
Bruce Johnson
-
Re: Bug report (I think)
There are naming conflicts between the external js files Fusion uses and the prototype library.
I ran into this some time ago and told WSP about it.
My solution was to replace Fusion navbars with AllWebMenus DHTML menus.
--
Chuck Joslin - Team NetObjects
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com
Register domain names at www.awavedomains.com
"Bruce Johnson (CapeSoft)" <bruceNOSPAM@capesoft.com> wrote in message
news:ef081r$7dc2@flsun90netnews01.netobjects.com...
> Hi All,
>
> I presume this is not the right place to report bugs, but I can't seem to login to the support.netobjects.com site, so
> hopefully there's someone here who can do something with this.
>
> I am not personally a NetObjects Fusion user, and I'm somewhat new to Javascript, so forgive me if the following is
> lame, or completely off the wall.
>
> I've been asked to add an Ajax component, based on prototype.js, to a page, in a web site, created with
> NetObjects Fusion. While doing this I encountered an endless loop, which caused me to dive into the JavaScript.
>
> I found 2 places in the file rollover.js (and I suspect there are more) where some additional code is necessary.
>
> The top of the rollover.js file reads :
> /**
> * Fusion 8 DHTML Menus
> */
>
> The first change I've made is to the hideMenuItem function
> this.hideMenuItem=function hideMenuItem(item){
> if(typeof(item)=="string")
> item=this.getItem(item)
> if(item==null||typeof(item)=="undefined"||item==""||typeof(item)=="number"||typeof(item)=="function")
> return;
> item.style.visibility="hidden";
> }
>
> All I did was add the bit
> ||typeof(item)=="function")
>
> Also later on, in NOF_OpenedItems(), a similar test
> this.removeItem=function removeItem(item){
> if(item==GLOBAL_CurrentItem)
> return;
> if (typeof(item)=='function')
> return;
>
> Both of these test are necessary (as far as I can see) because prototype.js creates functions on the fly (this bit is
> way beyond my javascript skills) and they then crop up in this bit of the NetObjects code...
>
> for(var i in itemsList)
> if(itemsList[i]&& itemsList[i].length){
> GLOBAL_items.removeItem(itemsList[i]);
> GLOBAL_Hide[i]=browser.hideMenuItem(itemsList[i]);
> }
>
> which is in the HideMenu function.
>
> I see many other functions in therollover.js file that take "item" as a parameter, some test the typeof(item), some
> don't. But I suspect that in many cases if it is typeof(function) then it should probably skip over it. those changes
> though I'll leave to you.
>
> I'll try again later to log into the support site, and report this there.
> Comments of course welcome.
>
> Cheers
> Bruce Johnson
>
>
>
-
Re: Bug report (I think)
Hi Chuck,
On AllWebMenus site they do not specify whether they integrate with NOF
9.0, do they? Is integration easy? Are there any gothchas?
TIA
dinko
------------------------------------------------------
Carpio d.o.o.
tel: 01 2371-621 / 2406-800
fax: 01 2371-622
www.carpio.hr
---------------------------------------------------
"Chuck «BeyondFusion»" <supportno@spambeyondfusion.com> wrote in message
news:ef0int$8u02@flsun90netnews01.netobjects.com...
> There are naming conflicts between the external js files Fusion uses and
> the prototype library.
>
> I ran into this some time ago and told WSP about it.
>
> My solution was to replace Fusion navbars with AllWebMenus DHTML menus.
>
> --
> Chuck Joslin - Team NetObjects
> BeyondFusion.com - Your Fusion Community
> www.beyondfusion.com
>
> Register domain names at www.awavedomains.com
>
> "Bruce Johnson (CapeSoft)" <bruceNOSPAM@capesoft.com> wrote in message
> news:ef081r$7dc2@flsun90netnews01.netobjects.com...
>> Hi All,
>>
>> I presume this is not the right place to report bugs, but I can't seem to
>> login to the support.netobjects.com site, so hopefully there's someone
>> here who can do something with this.
>>
>> I am not personally a NetObjects Fusion user, and I'm somewhat new to
>> Javascript, so forgive me if the following is lame, or completely off the
>> wall.
>>
>> I've been asked to add an Ajax component, based on prototype.js, to a
>> page, in a web site, created with
>> NetObjects Fusion. While doing this I encountered an endless loop, which
>> caused me to dive into the JavaScript.
>>
>> I found 2 places in the file rollover.js (and I suspect there are more)
>> where some additional code is necessary.
>>
>> The top of the rollover.js file reads :
>> /**
>> * Fusion 8 DHTML Menus
>> */
>>
>> The first change I've made is to the hideMenuItem function
>> this.hideMenuItem=function hideMenuItem(item){
>> if(typeof(item)=="string")
>> item=this.getItem(item)
>>
>> if(item==null||typeof(item)=="undefined"||item==""||typeof(item)=="number"||typeof(item)=="function")
>> return;
>> item.style.visibility="hidden";
>> }
>>
>> All I did was add the bit
>> ||typeof(item)=="function")
>>
>> Also later on, in NOF_OpenedItems(), a similar test
>> this.removeItem=function removeItem(item){
>> if(item==GLOBAL_CurrentItem)
>> return;
>> if (typeof(item)=='function')
>> return;
>>
>> Both of these test are necessary (as far as I can see) because
>> prototype.js creates functions on the fly (this bit is way beyond my
>> javascript skills) and they then crop up in this bit of the NetObjects
>> code...
>>
>> for(var i in itemsList)
>> if(itemsList[i]&& itemsList[i].length){
>> GLOBAL_items.removeItem(itemsList[i]);
>> GLOBAL_Hide[i]=browser.hideMenuItem(itemsList[i]);
>> }
>>
>> which is in the HideMenu function.
>>
>> I see many other functions in therollover.js file that take "item" as a
>> parameter, some test the typeof(item), some don't. But I suspect that in
>> many cases if it is typeof(function) then it should probably skip over
>> it. those changes though I'll leave to you.
>>
>> I'll try again later to log into the support site, and report this there.
>> Comments of course welcome.
>>
>> Cheers
>> Bruce Johnson
>>
>>
>>
>
>
-
Re: Bug report (I think)
Dinko,
The AWM Fusion component works with Fusion 7.5, 8 and 9.x.
The latest version of the component works with AWM 4.2.628 and above.
It's available for free from the Likno site or the BeyondFusion store page.
I updated it to work with Fusion 9 last November.
--
Chuck Joslin - Team NetObjects
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com
Register domain names at www.awavedomains.com
"Dinko Bacun" <dinkoATcarpio.hr> wrote in message news:ef2lcl$fif3@flsun90netnews01.netobjects.com...
> Hi Chuck,
>
> On AllWebMenus site they do not specify whether they integrate with NOF 9.0, do they? Is integration easy? Are
> there any gothchas?
>
> TIA
>
> dinko
>
> ------------------------------------------------------
> Carpio d.o.o.
> tel: 01 2371-621 / 2406-800
> fax: 01 2371-622
> www.carpio.hr
> ---------------------------------------------------
>
> "Chuck «BeyondFusion»" <supportno@spambeyondfusion.com> wrote in message
> news:ef0int$8u02@flsun90netnews01.netobjects.com...
>> There are naming conflicts between the external js files Fusion uses and the prototype library.
>>
>> I ran into this some time ago and told WSP about it.
>>
>> My solution was to replace Fusion navbars with AllWebMenus DHTML menus.
>>
>> --
>> Chuck Joslin - Team NetObjects
>> BeyondFusion.com - Your Fusion Community
>> www.beyondfusion.com
>>
>> Register domain names at www.awavedomains.com
>>
>> "Bruce Johnson (CapeSoft)" <bruceNOSPAM@capesoft.com> wrote in message
>> news:ef081r$7dc2@flsun90netnews01.netobjects.com...
>>> Hi All,
>>>
>>> I presume this is not the right place to report bugs, but I can't seem to login to the support.netobjects.com site,
>>> so hopefully there's someone here who can do something with this.
>>>
>>> I am not personally a NetObjects Fusion user, and I'm somewhat new to Javascript, so forgive me if the following is
>>> lame, or completely off the wall.
>>>
>>> I've been asked to add an Ajax component, based on prototype.js, to a page, in a web site, created with
>>> NetObjects Fusion. While doing this I encountered an endless loop, which caused me to dive into the JavaScript.
>>>
>>> I found 2 places in the file rollover.js (and I suspect there are more) where some additional code is necessary.
>>>
>>> The top of the rollover.js file reads :
>>> /**
>>> * Fusion 8 DHTML Menus
>>> */
>>>
>>> The first change I've made is to the hideMenuItem function
>>> this.hideMenuItem=function hideMenuItem(item){
>>> if(typeof(item)=="string")
>>> item=this.getItem(item)
>>>
>>> if(item==null||typeof(item)=="undefined"||item==""||typeof(item)=="number"||typeof(item)=="function")
>>> return;
>>> item.style.visibility="hidden";
>>> }
>>>
>>> All I did was add the bit
>>> ||typeof(item)=="function")
>>>
>>> Also later on, in NOF_OpenedItems(), a similar test
>>> this.removeItem=function removeItem(item){
>>> if(item==GLOBAL_CurrentItem)
>>> return;
>>> if (typeof(item)=='function')
>>> return;
>>>
>>> Both of these test are necessary (as far as I can see) because prototype.js creates functions on the fly (this bit
>>> is way beyond my javascript skills) and they then crop up in this bit of the NetObjects code...
>>>
>>> for(var i in itemsList)
>>> if(itemsList[i]&& itemsList[i].length){
>>> GLOBAL_items.removeItem(itemsList[i]);
>>> GLOBAL_Hide[i]=browser.hideMenuItem(itemsList[i]);
>>> }
>>>
>>> which is in the HideMenu function.
>>>
>>> I see many other functions in therollover.js file that take "item" as a parameter, some test the typeof(item), some
>>> don't. But I suspect that in many cases if it is typeof(function) then it should probably skip over it. those
>>> changes though I'll leave to you.
>>>
>>> I'll try again later to log into the support site, and report this there.
>>> Comments of course welcome.
>>>
>>> Cheers
>>> Bruce Johnson
>>>
>>>
>>>
>>
>>
>
>
-
Re: Bug report (I think)

Originally Posted by
Application Development
Hi All,
and they then crop up in this bit of the NetObjects code...
for(var i in itemsList)
if(itemsList[i]&& itemsList[i].length){
GLOBAL_items.removeItem(itemsList[i]);
GLOBAL_Hide[i]=browser.hideMenuItem(itemsList[i]);
}
which is in the HideMenu function.
definitely sloppy code here.
if(itemsList[i]&& itemsList[i].length){
should read
if(typeof itemsList[i] === 'string' && itemsList[i].length > 0){
or similar. Checking for the length property is not enough to see if it's a string, because functions and arrays also have length properties.
prototype properties will creep up in for-in-loops, so as soon as somebody augments the array prototype (which frameworks often do) this code will malfunction.
an even better idea would be to use a normal for-loop.