Javascript object AppendChild not workig on Safari(Mac).

  • den2005
  • Born
  • Born
  • den2005
  • Posts: 1

Post 3+ Months Ago

Hi,

I am helping a co-worker researching for solution for a javascript function that stores form objects using AppendChild, no rpoblem in IE and seems not working in Safari browser (Macintosh). Is there anyone has ideas how to solve this?

Thanks in advanced.



Code: [ Select ]
function appendVariantForms(frmCollectFrom,frmCollector)
{
//    alert('appendVariantForms');
    var frm = frmCollectFrom.elements;
    var elements = eval(frm.length);
    var ix = 0;
    var temp;
    for (;ix < elements;ix++)
    {
        try
        {
            temp = frm[ix].id;
            var obj = frm[ix];
    //        alert(obj.id.substr(0,2));
            if(obj.id.substr(0,2) != "x_")
            {
                frmCollector.appendChild(obj);
            }
        }
        catch(e)
        {
            elements = eval(frm.length);
            ix = 0;
        }
    }
    return frmCollector;

  1. function appendVariantForms(frmCollectFrom,frmCollector)
  2. {
  3. //    alert('appendVariantForms');
  4.     var frm = frmCollectFrom.elements;
  5.     var elements = eval(frm.length);
  6.     var ix = 0;
  7.     var temp;
  8.     for (;ix < elements;ix++)
  9.     {
  10.         try
  11.         {
  12.             temp = frm[ix].id;
  13.             var obj = frm[ix];
  14.     //        alert(obj.id.substr(0,2));
  15.             if(obj.id.substr(0,2) != "x_")
  16.             {
  17.                 frmCollector.appendChild(obj);
  18.             }
  19.         }
  20.         catch(e)
  21.         {
  22.             elements = eval(frm.length);
  23.             ix = 0;
  24.         }
  25.     }
  26.     return frmCollector;
[/code]
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.