PHP and JavaScript

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can some one explain to me why this code (Sliding menus) works fine with HTML but it doesn?t work with PHP?
   
  <?php
echo "<SCRIPT TYPE='TEXT/JAVASCRIPT' LANGUAGE=JAVASCRIPT>
  <!-- Hide script from older browsers
    function toggleMenu(currMenu) {
   if (document.all) {
    thisMenu = eval('document.all.' + currMenu + '.style')
    if (thisMenu.display == 'lock') {
     thisMenu.display = 'none'
    }
    else {
     thisMenu.display = 'block'
    }
    return false
   }
   else {
    return true
   }
  }
    // End hiding script -->
 </SCRIPT>
 <STYLE TYPE='TEXT/CSS'>
  #menu1 {display:none; margin-left:20px}
   </STYLE>
</HEAD>
  <H3>
 <A HREF='page1.html' onClick='return toggleMenu('menu1')'>Update The Record</A>
</H3>
<SPAN ID='menu1'>
 <FORM>
    <P>
    <TEXTAREA name='hetext' rows='10' cols='40'>
      Update the record
    </TEXTAREA>
    <INPUT type='submit' value='Update'><INPUT type='reset'>
    </P>
 </FORM>
  
</SPAN>";
  ?>




 

       
---------------------------------
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection. 

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux