p_a
Sep 23 2005, 09:09 PM
| | I have many PHP Books, PHP Bible among others, but no clear description how to build menus (dynamic) Javascript like. Is PHP enough strong to do this? I also have Javascript Bible, many possibilities are usable within PHP pages.
Anybody has experience in creating dynamic menus in PHP?
|
Reply
moldboy
Sep 24 2005, 12:03 AM
How do you mean dymanic? if you mean like the mouse over and display alternate options, then I really don't think so, that is a javascript, dhtml, css, or flash relm, something client side, the only way a mouse over menu would work with php is if by some action you could submit the page on mouseover and return new results, but taht wouldn't be efficeant. Besides the very name, PHP bible, probably wouldn't tell you how to do something with Javascript if it could be done with PHP.
Reply
arboc7
Sep 24 2005, 12:20 AM
You cannot create any dynamic menus using PHP because it executes on the server, not at the client. JavaScript executes on the client-side, so much more dynamicity is available. A few people have figured out how to create multi-level "pop-out" menus using CSS, and if you want to find that, just google it! Sorry that you can't use PHP for your menus...
Reply
Spectre
Sep 24 2005, 06:47 AM
You can use PHP to send the HTML/DHTML/JavaScript/whatever code to the client. The dynamic generation could be done with PHP to change the entries the menu contains, for example. The actual menu would be constructed using, most likely, a combination of HTML and JavaScript. I don't know why anyone would want to do this - menus are usually a static method of travelling around a web site. Such as: CODE <?php echo '<whatever>' . date('M jS') . '</whatever>'; ?>
Reply
p_a
Sep 24 2005, 09:13 AM
Javascript is, of course, very usable. I used even few Javascript menu generators. But, sometimes I would like to do something like this: I have a website with, for example 10 webpages. I want to have the same header and footer at all of them. I make pages, and include the header.php at the top, and the footer.php at the bottom. Javascript menu is in the header.php. Menu is simple, and complete inside one function. When I started website from initial index.something (may be .php or .html) I do not see the header at all (even it's included). The most interesting thing is the fact: I save the Javascript function to the .js file, I put the line of code where I am calling the .js from header.php, and - everything works! Why? Where is the problem? It has to work both ways by any logic! Because it's the same thing. Or it is not.
Reply
Amezis
Sep 24 2005, 01:52 PM
Your server probably don't support PHP scripting, so none of your PHP scripts will work. PHP, ASP etc are server-side scripts, so the programs to run the scripts has to be installed on the server. Javascript is a browser-side scripting language, so it will work as long as the browser supports it. If, you get hosted here on Trap17, your PHP scripts will work.
Reply
p_a
Sep 24 2005, 08:59 PM
I can see the complete page with header and footer included. Problem is the menu in header. If the Javascript code function is inside the header.php it will not work, it will not be visible in the webpage. If it is outside header.php as, for example menu.js, I just put the ordinary code to call the Javascript from header.php, it works perfect.
Reply
sobhan
Oct 2 2005, 02:13 PM
I tink you can use Java n PHP. But i am not shure. Like this <?php print_f '<html><head><script laguange="javascript"....></script></head></html>'; ?>
Reply
Recent Queries:--
php menus - 10.51 hr back. (2)
-
dynamic menu using javscript php mysql - 81.48 hr back. (1)
-
call javascript menu from php - 90.11 hr back. (1)
-
menu example php javascript - 91.58 hr back. (1)
-
"php menus" - 28.37 hr back. (2)
-
how to build a dynamic from using javascript and php - 130.23 hr back. (1)
-
php without javascript - 225.46 hr back. (1)
-
mouseover menu in php - 251.39 hr back. (2)
-
creating n levels on mouse-over using php - 271.61 hr back. (1)
-
"without javascript" - 287.33 hr back. (1)
-
multi level menus using javascript - 291.57 hr back. (1)
-
php mysql exemple menu - 308.96 hr back. (1)
-
"menus in php","example" - 314.82 hr back. (2)
-
php use javascript menu - 330.79 hr back. (1)
Similar Topics
Keywords : php, menus, javascript, php, possibility, js
- Can I Make Dynamic Menu In Php
is it posible to make dynamic menu in php without javascript (7)
Building A Chat Using Javascript, Php, And Ajax
(2) I have heard that you can build a chat for a website that would display the username, etc, using
PHP, Javascript, and AJAX. So Im wondering how this can be done and if there are any tutorials on
how to do it, or tutorials on AJAX. Thank you.....
Javascript And Php
(6) i am designing a poll in which i use javascript, and i need to pass the selected answer in my poll
to php variables so how can i do that, any help will be appricated....
Javascript To Php - A Few Questions
(1) I am rewriting a Javascript into PHP, but I have two questions: How can I write these functions in
PHP? Math.floor Math.ceil I'm sure the answer is obvious, but I really can't find it...
/laugh.gif' border='0' style='vertical-align:middle' alt='laugh.gif' /> ....
Dynamic Included Menus
path specification (8) I am looking for a way to make a dynamic menu using php and include, basicly I want to make a file
that contains html formating source and links and include it somewhere in all my pages, the problem
is that links are taken literaly and refered to as to where the html is running from. So is there a
way I can make a file and include it in my pages, then it will determin where the page is running
from, and generate the links with an approperate amount of ../../'s so if my index is at root,
but every section has it's own folder, I want to be able to include this fil....
Whould I Use Php To Make A Game Like The Army System?
Or javascript? (4) I want to make a game similar to the army system or on Omega Gateway, like a text game. Would I use
php or javascript? I know very little coding, and I plan on learning more before I start doing
anything. I just want to know what to 'study...'....
Looking for php, menus, javascript, php, possibility, js
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for php, menus, javascript, php, possibility, js
*MORE FROM TRAP17.COM*
|
advertisement
|
|