It works with HTML without body
Copy any paste this code and see it your self.
So the problem is not the body
<----------------Start Code------------------------->
<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 == "block") {
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>
<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>
<----------------End Code------------------------->
bedul <[EMAIL PROTECTED]> wrote:
----- Original Message -----
From: "sam rumaizan"
To:
Sent: Saturday, May 12, 2007 1:10 PM
Subject: [PHP-WIN] PHP and JavaScript
> Can some one explain to me why this code (Sliding menus) works fine with
HTML but it doesn't work with PHP?
>
try this.. i just add
echo "
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 -->
#menu1 {display:none; margin-left:20px}
Update The
Record
<br> Update the record<br>
[input] [input]
";
?>
---------------------------------
Give spam the boot. Take control with tough spam protection
in the all-new Yahoo! Mail Beta.