TFRPortal is now FireFox friendly

by Jeff 17. March 2009 21:16

Today I got the project working properly with FireFox and I am 98% Safari compatible.

You can download the code here (3.65 mb).

The issues where element.firstChild and element.nextSibling they where resolved using the following functions.

function IsNull ( obj )
{
    if ( obj == null || obj == "undefined" ) return true;
    
    return false;
};
 
function getFirstChild ( element )
{
    if ( IsNull ( element ) ) throw Error.argumentNull("element");
    if ( IsNull ( element.childNodes ) ) throw Error.argumentNull("element.childNodes");
    
    if ( element.childNodes.length < 1 )
    {
        return null;
    };
    
    var count = element.childNodes.length;
    var childNodes = element.childNodes;
    
    for ( var index = 0; index < count; index++ )
    {
        var child = childNodes[index];
        
        if ( child.nodeType == 1 )
        {
            Sys.Debug.trace("child = " + child + ", child.nodeType = " + child.nodeType);
            
            return child;
        };
    };
    
    return null;
};
 
function getNextSibling ( element )
{
    if ( IsNull ( element ) ) throw Error.argumentNull("element");
    
    var sibling = element.nextSibling;
    
    while ( !IsNull(sibling) && sibling.nodeType != 1 )
    {
        sibling = sibling.nextSibling;
    };
    
    return sibling;
};

They are a slight rewrite of the functions I found here.

I also found that there was another way of doing it using the Ajax Control toolkit but by that time I was already done.

here the function

AjaxControlToolkit.DragDropManager._getInstance().getNextSibling(this._dragVisual);

Bookmark and Share

Tags:

Asp.net | Asp.net AJAX | Asp.net AJAX Control Toolkit | TFRPortal | Web Parts

Comments

6/9/2009 2:24:27 AM #

Kiran

Hi Jeff,

Thanks for really nice code for transforming Tables in Div..it really helped me.

I have few questions as below:

1. When i drag and drop item in firefox it flickers Frown [Firefox version : 3.0.10]..Would you suggest me something?

2. I don't want the page to be flickered on drag and drop if i wrap the stuff in updatepanel some js error pops up..pls suggest me something..

Kiran India

6/29/2009 12:50:00 PM #

pingback

Pingback from kiranpatils.wordpress.com

Tableless WebParts and WebPartZones « A Place for C Sharpers/.Netters

kiranpatils.wordpress.com

6/6/2010 1:14:07 AM #

Kurtis Patrias

purchased this handset today & it's  the best smartphones i have had the pleasure of using. There were quite a few individuals at Sprint when i got my phone.  so quick and snappy. The snapdragon 1 gigahertz chip is a lot easier compared to my g1. there is a awesome http://htcevoreview.com">htc evo review here!

Kurtis Patrias United States

6/22/2010 6:08:58 AM #

Christian Pinnell

I've subscribed to your news feed after reading this post! Would you say more on the topic in future posts?

Christian Pinnell United States

6/24/2010 2:22:07 PM #

Gianna Killibrew

Just to let you know... your web site looks really peculiar in Chameleon on a mac

Gianna Killibrew United States

7/4/2010 12:27:52 PM #

Leslee Wuest

Bizarre... I just came across your site by searching for 'financial spreadbetting' on Yahoo. But I don't see any posts about that on here?

Leslee Wuest United States

7/13/2010 4:01:20 AM #

Gaylord Louderback

I stumbled on a link to your website on a Currency trading web site, and I should say... Your web site is much better. You make the subject easier to understand, thanks

Gaylord Louderback United States

7/27/2010 1:06:01 PM #

Lawrence Bilson

Whats happening, I discovered this site about this subject by mistake when I was going through Bing after that I arrived to your web site. I have to say your website is interesting I really like your theme! Now I don�t have the free time at the current moment to totally browse your sitebut I have bookmarked it. I will be back in a day or 2 . Thanks for a good site.

Lawrence Bilson France

7/28/2010 1:49:51 PM #

Adelaida Knupp

Positive site, where did you come up with the information in this posting? I'm pleased I found it though, ill be checking back soon to find out what further articles u include.

Adelaida Knupp Afghanistan

7/31/2010 11:34:25 PM #

Celia Adjutant

Hey, good day. Nice post. You've gained a new reader. Pls stick with it and I stay up for more of your glorious weblog posts. Greets, Jessica.

Celia Adjutant Colombia

8/10/2010 7:57:29 PM #

Latoyia Mould

this subject this subject this subject I wholly consider the above remark, the internet is with a doubt growing into a very powerful medium of communication across the globe & its due to sites like this that ideas are spreading so quickly

Latoyia Mould Lebanon

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET

Code Research Center

©2009 CodeResearchCenter.com. All Rights Reserved

About Me

I'm a 30 year old browser based software developer who has just started to research the various ways to make money online. My current interests are software development, online marketing, social networking and blogging.

Disclaimer

These postings are provided "AS IS" with no warranties, use at your own risk

Page List

Poll

What blog platform do you use?



Show Results