Active hover and select menu buttons with php
Posted: Tue May 24, 2011 11:20 pm
Hi,
I am slightly confused in doing a php page, the best way to describe the problem is to follow it.
Please go to www.chatablog.co.uk/sj
The whole page is php, the main area where all the text is in the includes/content folder - everything outside is within the index.php that automatically includes to each page.
However the buttons have 3 actions, active, hover and select. - I can do the active and hover, but unsure how to get select to function as the buttons are called from the index.php page (which will only allow the 2 functions active and hover) as I would need to show it on the other pages. If I add it to the other pages it will duplicate it.
below is the code for the index.php (upto the <? php ?> and some codes shown on recruit.php page - just a little bit past the body)
Any help will be much appreciated.
index.php
RECRUIT.PHP
I am slightly confused in doing a php page, the best way to describe the problem is to follow it.
Please go to www.chatablog.co.uk/sj
The whole page is php, the main area where all the text is in the includes/content folder - everything outside is within the index.php that automatically includes to each page.
However the buttons have 3 actions, active, hover and select. - I can do the active and hover, but unsure how to get select to function as the buttons are called from the index.php page (which will only allow the 2 functions active and hover) as I would need to show it on the other pages. If I add it to the other pages it will duplicate it.
below is the code for the index.php (upto the <? php ?> and some codes shown on recruit.php page - just a little bit past the body)
Any help will be much appreciated.
index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Welcome To Spaghetti Johns</title> <link href="style/style.css" rel="stylesheet" type="text/css" /> <link href="style/forms.css" rel="stylesheet" type="text/css" /> <link href="scripts/lightbox-0.5/css/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" /> <link href="scripts/prettyphoto/css/prettyPhoto.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="scripts/li-slider/js/jquery-1.5.1.min.js"></script> <script type="text/javascript" src="scripts/li-slider/js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="scripts/li-slider/js/jquery.lightbox-0.5.js"></script> <script type="text/javascript" src="scripts/prettyphoto/js/jquery.prettyPhoto.js"></script> <link href="scripts/li-slider/skins/Dark/skin.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="scripts/li-slider/js/li-slider-1.1.js"></script> <script type="text/javascript" src="scripts/li-slider/js/li-slider-animations-1.1.min.js"></script> <link rel="shortcut icon" href="images/Page/testbg/sj_icon.ico" /> <script type="text/javascript"> $(window).load( function() { $("#li-banner").sp_Li_Slider({ animation : "Random", // type of Animation: Regular, Random, Regular-Custom, Random-Custom, Regular-Exception, Random-Exception transitions : 'None', // None|transition_name(s) // List of custom animations - for full list please reference to the preview (works only with "Regular-Custom, Random-Custom, Regular-Exception , Random-Exception ") auto_play : true, // true|false - auto play on start repeat : true, // true|false|number - how many times to repeat all slides modalMode : 'prettyPhoto',// lightBox|prettyPhoto|off goToSlideOnStart : 1, // value //any slide number starting from 1 or url?sp_slide=2 timer : 'no',// no|line_bottom|line_top|line_right|line_left pauseOnMouseOver : false, // true|false tooltip : 'image', // none|text|image tooltipSize : 20, // value // % of slider dimentions from 0 to 100. Use 0 to disable it shuffle : false, // true|false - randomize the images order delay : 4000, // value // time period of a photos displaying /default - 3000 (3 sec) trans_period : 2000, // value // time period of chenging the photos /default - 1000 (1 sec) vert_sections : 10, // value // number of vertical sectors (only for Animation type Blind) /default - 15 sqr_sections_Y : 4, // value // number of squeres by vertical (only for Animation type Sqr) /default - 5 active_links : true, // true|false //activate links of photos /default - true buttons_show : false, // true|false //show all buttons /default - true play_pause_show : false, // true|false //show Play or Pause buttons /default - true next_prev_show : false, // true|false //show Next or Prev buttons /default - true auto_hide : true, // true|false // auto hide buttons ot start (when auto_play is true) buttons_show_time : 3000, // value //time period befor displayins of the buttons /default - 100 buttons_show_delay : 500, // value //time period for appearing of the buttons /default - 300 buttons_hide_time : 2000, // value //time period befor disappearing of the buttons/default - 2000 buttons_hide_delay : 500 // value //time period for disappearing of the buttons /default - 500 }); } ); </script> </head> <body> <div id="topcenter"> <div id="logo"><a id="logo" href="index.php?page=home"></a></div><!--LOGO --> <div id="topspacer"> <div id="menu"> <a id="home-select" href="#" title="Welcome" alt="Welcome"></a> <a id="menus-select" href="#" title="view our menu" alt="view our menu"></a> <a id="reviews-select" href="#" title="read our reviews" alt="read our reviews"></a> <a id="contact-select" href="#" title="contact us" alt="contact us"></a> <a id="facebook" title="join us on facebook" alt="join us on facebook" href="http://www.facebook.com" target="_blank"></a> <a id="twitter" title="tweet us on twitter" alt="tweet us on twitter" href="http://www.twitter.com" target="_blank"></a> </div><!-- TOPSPACER --> </div><!-- MENU --> </div><!-- TOPCENTER --> <div id="center"> <div id="bg1"> <div id="main"> <?php include ('includes/content.php'); ?> </div><!-- MAIN -->
RECRUIT.PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Welcome To Spaghetti Johns || Recruitment Page</title> </head> <script type="text/javascript"> function MM_validateForm() { //v4.0 if (document.getElementById){ var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } } </script> </head> <body> <div id="slidepics"> <!-- Slider Start --> <div id="li-banner" class="li-banner" style="width:950px; height:150px;"> <ul> <li><img src="images/Page/testbg/food.jpg" /></li> <li><img src="images/Page/testbg/food2.jpg" /></li> <li><img src="images/Page/testbg/food3.jpg" /></li> </ul> </div> <!-- Slider End --> </div><!-- SLIDEPICS --> <div id="recruit-select"></div> <div id="recruittop">