jQuery

elevateZoom (Requires jQuery)

Facebook Messenger (Donation)


Many donors of this blog prefer to donate their money through Facebook Messenger!

Click here to go to this blog's Facebook Page!

Thank you!

Activation Code - Donation (Multiple Options)



Donate

Request Web\PHP\JavaScript\HTML Project !

Contact us if you want us to develop a Web\PHP\JavaScript\HTML project for you!

Advertise On This Blog!

If you want a Product\Service\Event to be advertised on this blog, feel free to contact us!

Ads (Reserved)

Thursday, February 15, 2018

PHP\JavaScript - 1 Layout for Several Pages (Basic)

"index.html" contains the layout! (Download All Files)

 - Url "Folder-Path/index.html" loads "Home.html"

 - Url "Folder-Path/index.html?Page=About.html" loads "About.html"

 - Url "Folder-Path/index.html?Page=Contact.html" loads "Contact.html"

 - Url "Folder-Path/index.html?Page=DontExist.html" returns "Page does not exist or could not be loaded!"

Everything works great, the only problem is that:

 - The website will depend on JavaScript (JavaScript must be enabled!)
 - If JavaScript is not enabled, the website warns user that JavaScript must be enabled!

 - Deprecated "Synchronous XMLHttpRequest" is in use (Script only continues after server response)

index.html = layout (JavaScript Ajax Get + Url parameters Values)


Home.html


About.html


Contact.html




________________ Old approach below ________________




(PHP - Notes): Your server or web hosting provider must support PHP scripts in order to work!

layout.html


index.php (PHP + JavaScript)


index.php (PHP only)


index.html (JavaScript only - Ajax Get)


index.html (JavaScript only - jQuery)




Keywords:
PHP\JavaScript - 1 Layout for Several Pages (Basic)

No comments:

Post a Comment

ADS - Multi Share Calculator

https://windowsportableapps.blogspot.com/2019/03/multi-share-calculator.html