Php Menus Without Javascript - Has PHP possibility to do it without JS

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > PHP Programming

Php Menus Without Javascript - Has PHP possibility to do it without JS

p_a
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
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
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
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
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
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
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
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



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. php menus - 10.51 hr back. (2)
  2. dynamic menu using javscript php mysql - 81.48 hr back. (1)
  3. call javascript menu from php - 90.11 hr back. (1)
  4. menu example php javascript - 91.58 hr back. (1)
  5. "php menus" - 28.37 hr back. (2)
  6. how to build a dynamic from using javascript and php - 130.23 hr back. (1)
  7. php without javascript - 225.46 hr back. (1)
  8. mouseover menu in php - 251.39 hr back. (2)
  9. creating n levels on mouse-over using php - 271.61 hr back. (1)
  10. "without javascript" - 287.33 hr back. (1)
  11. multi level menus using javascript - 291.57 hr back. (1)
  12. php mysql exemple menu - 308.96 hr back. (1)
  13. "menus in php","example" - 314.82 hr back. (2)
  14. php use javascript menu - 330.79 hr back. (1)
Similar Topics

Keywords : php, menus, javascript, php, possibility, js

  1. Can I Make Dynamic Menu In Php
    is it posible to make dynamic menu in php without javascript (7)
  2. 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.....
  3. 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....
  4. 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' /> ....
  5. 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....
  6. 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...'....

    1. 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



Php Menus Without Javascript - Has PHP possibility to do it without JS



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE