Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2010
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    background div (black_overlay) did not appear in javascript lightbox

    <style>
    .black_overlay {
    display : none;
    position : absolute;
    top : 0%;
    left : 0%
    width : 100%;
    height : 100%;
    background : black;
    z-index : 1001;
    opacity : .80;
    filter : alpha(opacity = 80 );
    }
    .white_content {
    display : none;
    position : absolute;
    top : 25%;
    left : 25%;
    width : 50% ;
    height : 50% ;
    padding : 16px ;
    border : 16px solid orange
    background-color : white;
    z-index : 1002;
    overflow : auto;
    }

    </style>
    <body>
    <a href = "javascript: void " onClick ="document.getElementById('LIGHT').style.display='block'; document.getElementById('FADE').style.display='block'">
    ALBUM SONGS
    </a>
    <DIV ID="LIGHT" class="white_content">

    <TABLE WIDTH="400" BORDER="10" BGCOLOR="YELLOW">
    <?php
    $SQLARTIST =" SELECT * FROM ARTIST ";
    $FARTIST = mysql_query( $SQLARTIST, $CON );
    $HARTCOD = 0 ;
    $HARTNAM = "";
    ?>
    <td BGCOLOR="RED"><B>Artist </B></td>
    <td BGCOLOR="RED">
    <SELECT NAME="ARTISTCBO">
    <OPTION SELECTED VALUE="<?php echo($HARTCOD) ?>"><?php echo($HARTNAM) ?><OPTION>
    <?php
    while ( $ARTIST = mysql_fetch_object( $FARTIST )){
    $ARTCOD = $ARTIST->ARTCOD;
    $ARTNAM = $ARTIST->ARTNAM;
    ?>
    <OPTION VALUE="<?php $ARTCOD ?>"><?php echo($ARTNAM) ?></OPTION>
    <?php
    }
    ?>
    </td>
    </tr>
    <TR>
    <?php
    $SQLGROUP=" SELECT * FROM GROUPS ";
    $FGROUP = mysql_query( $SQLGROUP , $CON );
    $HGRPCOD = 0 ;
    $HGROUPNAM = "";
    ?>
    <td BGCOLOR="YELLOW"><B>Group</B></td>
    <td BGCOLOR="YELLOW">
    <SELECT NAME="GROUPCBO">
    <OPTION SELECTED VALUE="<?php echo($HGRPCOD) ?>"><?php echo($HGROUPNAM) ?><OPTION>
    <?php
    while ( $GROUP = mysql_fetch_object( $FGROUP )){
    $GRPCOD = $GROUP->GRPCOD;
    $GROUPNAM = $GROUP->GROUPNAM;
    ?>
    <OPTION VALUE="<?php $GRPCOD ?>"><?php echo($GROUPNAM) ?></OPTION>
    <?php
    }
    ?>
    </td>
    </tr>
    <tr>
    <td BGCOLOR="RED"><B>Song Title</B></td>
    <td BGCOLOR="RED">
    <?php
    $SQLSONG =" SELECT * FROM SONGFIL ";
    $FSONGFIL= mysql_query( $SQLSONG , $CON );
    $HSONGCOD=0;
    $HSONGTITLE="";
    ?>
    <SELECT NAME="SONGCBO">
    <OPTION SELECTED VALUE="<?php echo($HSONGCOD) ?>"><?php echo($HSONGTITLE) ?><OPTION>
    <?php
    while ( $SONG = mysql_fetch_object( $FSONGFIL )) {
    $SONGCOD = $SONG->SONGCOD;
    $SONGTITLE= $SONG->SONGTITLE;
    ?>
    <OPTION VALUE="<?php $SONGCOD ?>"><?php echo($SONGTITLE) ?></OPTION>
    <?php
    }
    ?>
    </td>
    </tr>
    <tr>
    <td BGCOLOR="RED"><B>Rythm</B></td>
    <td BGCOLOR="RED">
    <?php
    $SQLRYTHM =" SELECT * FROM RYTHM ";
    $FRYTHM = mysql_query( $SQLRYTHM , $CON );
    $HRYTHMCOD=0;
    $HRYTHMNAM="";
    ?>
    <SELECT NAME="RYTHMCBO">
    <OPTION SELECTED VALUE="<?php echo($HRYTHMCOD) ?>"><?php echo($HRYTHMNAM) ?><OPTION>
    <?php
    while ( $RYTHM = mysql_fetch_object( $FRYTHM )) {
    $RYTHMCOD = $RYTHM->RYTHMCOD;
    $RYTHMNAM = $RYTHM->RYTHMNAM;
    ?>
    <OPTION VALUE="<?php $RYTHMCOD ?>"><?php echo($RYTHMNAM) ?></OPTION>
    <?php
    }
    ?>
    </td>
    </tr>
    <TR>
    <?php
    $PAGENUM=1
    ?>
    <TD BGCOLOR="GREEN"><INPUT TYPE="SUBMIT" NAME="OKBUTTON" VALUE="SEARCH ORDERS"></td>
    </FORM>
    </tr>
    </TABLE>

    </DIV>
    <DIV ID="FADE" class="black_overlay">


    </DIV>

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Please don't post PHP code in the JavaScript forum.

    For starters, some of use <gasp/> don't use PHP.

    But even for those who do, they won't have your database and won't be able to test your PHP code. (And mysql_query is obsolete, in case you didn't know. You should have long since moved to at least mysqli coding if not more modern stuff.)

    Bring up your PHP page in your browser, click on the VIEW menu of your browser, click on the SOURCE or PAGE SOURCE menu item. Now you will be looking at the HTML *as your browser sees it*. Copy/paste *THAT* to this forum, please.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    But you know, your problem has *NOTHING* to do with JavaScript.

    Your CSS is illegal in a couple of spots:
    Code:
    .black_overlay {
    display : none;
    position : absolute;
    top : 0%;
    left : 0%  missing semicolon
    width : 100%;
    height : 100%;
    background : black;
    z-index : 1001;
    opacity : .80;
    filter : alpha(opacity = 80 ); 
    }	
    .white_content {
    display : none;
    position : absolute;
    top : 25%;
    left : 25%;
    width : 50% ;
    height : 50% ;
    padding : 16px ;
    border : 16px solid orange missing semicolon
    background-color : white;
    z-index : 1002;
    overflow : auto;
    }
    Add the two missing semicolons and it all works.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •