ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Advanced Search behaves badly in FF 2 for Mac

April 03, 2008 1:34pm

Subscribe [2]
  • #1 / Apr 03, 2008 1:34pm

    Sam Stigler

    20 posts

    Hi,

      I have an advanced search form accessible at this page.  It works fine on Safari 3.1, but a user with Firefox has reported the search button not working.  I am able to reproduce the issue in Firefox for Mac 2.0.0.13.  What appears to be the issue is this block of the advanced search Javascript code generated by EE:

    if (blogs == "7")
            {    
    
            } // END if blogs
                
             
                                    
            if (reset > 1)
            {
                 categories = new Array();
            }
    
            spaceString = eval("/!-!/g");
            
            with (theSearchForm.elements['cat_id[]'])
            {
                for (i = length-1; i >= firstcategory; i--)
                    options[i] = null;
                
                for (i = firstcategory; i < categories.length; i++)
                {
                    options[i] = categories[i];
                    options[i].text = options[i].text.replace(spaceString, String.fromCharCode(160));
                }
                
                options[0].selected = true;
            }
            
        }
    }
    
    //]]>

    Everything after the greater-than sign in “if (reset > 1),” up through the end of the script block, isn’t code-colored in Firefox’s page source viewer, which leads me to think there’s some problem with the generated code.  Again, it works fine on Safari.

    Here’s the code for the search form:

    
    
    

    Does anyone have any ideas?

    Thanks,
    Sam

  • #2 / Apr 03, 2008 2:10pm

    Paul Burdick

    480 posts

    When using Firefox, looking in the source code, it seems there is a problem with the following code comment.

    <!--- Source: <a href="http://ellislab.com/forums/viewthread/53407/#332304">http://ellislab.com/forums/viewthread/53407/#332304</a> ---->

    If you reduce the number of dashes in the closing to three, the code now shows up correctly in the syntax highlighting in View Source.

  • #3 / Apr 03, 2008 4:50pm

    Sam Stigler

    20 posts

    Hi Derek and Paul,

    I don’t why, but removing that extra dash in the comment seems to have fixed the problem.  Thanks for your help!  I’ll be more careful in the future with my comments.

    By the way, if you’re still interested, I’m using ExpressionEngine 1.6.3, build 20080319.

    -Sam

  • #4 / Apr 03, 2008 4:51pm

    Derek Allard

    3168 posts

    Great stuff Sam, we’re glad to have helped.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases