onclick showForm shows Form overlapping page in FireFox

Discussion in 'JavaScript' started by djsnowman, Apr 10, 2008.

  1. #1
    I have a Joomla site running SOBI2 component and its Reviews plug-in.

    The plug-in basically lets visitors vote and write reviews for a particular restaurant.

    There is a "write review" button and when the visitor clicks on it, a form expands below it for writing the review. Everything seems OK, but the form displays floating on top of the rest of the page.

    Here is a picture showing the problem:
    [​IMG]

    I've seen the plug-in demo site and it is suppose to expand the table to fit the form when onclick.

    I've tried to view the page using IE and it works fine. The problem only appears in Firefox.

    I believe it is something with the Javascript using to display the form when the button is clicked.

    This is where I think the form displays after the showRevForm function after onclick:

    <script language="JavaScript" type="text/javascript">
    /* <![CDATA[ */
    <?php if($this->revsOn) { ?>
    function showRevForm() {
    document.getElementById("reviewFormBox").style.display = "block";
    document.getElementById("reviewBt").style.display = "none";
    document.getElementById("sendVoteBt").style.display = "none";
    document.getElementById("revSendButton").style.display = "block";

    The link is: http://www.ronaldsu.com/cms/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=2&sobi2Id=2&Itemid=27

    For more codes from the script:
    http://www.ronaldsu.com/cms/reviews_plugin.zip

    The problem should be in reviews.class.php around line 720.

    P.S. I have tried changing the code to:
    document.getElementById("reviewFormBox").style.display = "";
    document.getElementById("reviewBt").style.display = "none";
    document.getElementById("sendVoteBt").style.display = "none";
    document.getElementById("revSendButton").style.display = "";

    it still displays the form off the table floating on top of the footer when using Firefox.

    As I am an extreme amateur in web dev, any advice is appropriated, thanks in advance. :)
     
    djsnowman, Apr 10, 2008 IP
  2. djsnowman

    djsnowman Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just noticed that the form only displays properly when using IE 6. With IE 7 is used, the form display is messed up too. I don't know what the problem is.... it seems to be the problem isn't common.

    The demo site of the script is working fine with the same script. It's just the site I have. Maybe it is a problem within my template?

    Someone please help me.....
     
    djsnowman, Apr 10, 2008 IP