Click to See Complete Forum and Search --> : Problem with menu.php
silentarts
09-28-2009, 01:23 PM
Hey guys. I am looking for a bit of help here.
I have a website that i have been making and basically i got an error in Dreamweaver that said:
"There is a syntax error on line 14 of menu.php. Code hinting may not work until you fix this error."
I open the menu.php file and went to Line 14 and this is what is has:
"widthFX[i].push(new Fx.Width(elm, {duration: , transition: }).set(0)); });"
If you want the actual file to check it out, please click here (http://silentarts.110mb.com/index.htm).
THANKS A MILL FOR ANY HELP THAT YOU CAN GIVE...
THANKS AGAIN...
PETTE
09-29-2009, 07:23 PM
Hey guys. I am looking for a bit of help here.
I have a website that i have been making and basically i got an error in Dreamweaver that said:
"There is a syntax error on line 14 of menu.php. Code hinting may not work until you fix this error."
I open the menu.php file and went to Line 14 and this is what is has:
"widthFX[i].push(new Fx.Width(elm, {duration: , transition: }).set(0)); });"
If you want the actual file to check it out, please click here (http://silentarts.110mb.com/index.htm).
THANKS A MILL FOR ANY HELP THAT YOU CAN GIVE...
THANKS AGAIN...
That is not PHP. That's Javascript in a PHP file. It'll be best to post the all PHP file scripts. I doubt we'll be able to link to it since it'll be processed by the server.
If there is just this on line 14 then this is definately an error:
"widthFX[i].push(new Fx.Width(elm, {duration: , transition: }).set(0)); });"
I think this is suposed to be a variable or echo statement. For instanse,
$variable = "widthFX[i].push(new Fx.Width(elm, {duration: , transition: }).set(0)); });"
Or
echo "widthFX[i].push(new Fx.Width(elm, {duration: , transition: }).set(0)); });"
silentarts
09-30-2009, 12:29 PM
Ok Pette... Thanks for your reply. What i cannot understand is what you want. You said "It'll be best to post the all PHP file scripts." What exactly do you want. Do you want the entire file? You can find that here:
// GK MooMenu v.2.0 Copyright by GavickPro window.addEvent("domready", function(){ // necessary classes Fx.Width = Fx.Style.extend({initialize: function(el, options){this.element = $(el);this.element.setStyle('overflow', 'hidden');this.iniWidth = this.element.getStyle('width').toInt();this.parent(this.element, 'width', options);},toggle: function(){var style = this.element.getStyle('width').toInt(); return (style > 0) ? this.start(style, 0) : this.start(0, this.iniWidth);},show: function(){return this.set(this.iniWidth);}}); var main = $("horiz-menu"); var levels = new Array(); var widthFX = new Array(); main.getChildren().each(function(el,i){ levels.push(new Array()); widthFX.push(new Array()); el.getElementsBySelector("ul").each(function(elm,j){ levels[i].push(elm.getParent()); widthFX[i].push(new Fx.Width(elm, {duration: , transition: }).set(0)); }); }); levels.each(function(e,k){ e.each(function(a,l){ a.addEvents({ "mouseenter" : function(){ a.getChildren()[1].setStyle("overflow","hidden"); widthFX[k][l].toggle(); (function(){a.getChildren()[1].setStyle("overflow","")}).delay(); }, "mouseleave" : function(){ a.getChildren()[1].setStyle("overflow","hidden"); widthFX[k][l].stop().set(0); } }); }); }); });
silentarts
09-30-2009, 12:31 PM
Also, if you want to see the file in original settings....go to:
http://silentarts.110mb.com/index.htm and right click link and click "Save Target As.."
PETTE
10-04-2009, 05:02 AM
This is JavaScript, I'm afraid. Not PHP. If the this script is enclosed in <? and ?>. Then this will definately produce a PHP error. Otherwise the file is being treated as a JavaScript file. Thus you should delete the PHP file and save it as a JavaScript file and call it in the <script></script> element. Or you could copy and past the javascript script inbetween the element.
______________________________________
CACIOCODE (http://www.caciocode.com) now blogging. www.caciocode.com