This is a Non-RegEx String Replace Function!
All RegEx special characters from "Match" and "Replace" parameters are automatically escaped!
Some people alerted me that v1.0 is not compatible with Internet Explorer, so I decided to release v1.1!
(v1.0 is not compatible because Internet Explorer does not support functions default parameters values!)
v1.1 (Compatible with Internet Explorer)
v1.0 (Not compatible with Internet Explorer)
Keywords:
JavaScript - Non-RegEx String Replace Function
JavaScript - Non-RegEx StringReplace() Function
JavaScript - Non-RegEx StringReplace(Function)
- Alcatel (6)
- Android (6)
- Blogger (10)
- Calculators (1)
- Facebook (1)
- Games (4)
- GitHub (1)
- Html-Css-Js (45)
- Illustrator (2)
- InfoSec (13)
- Photoshop (4)
- PHP (11)
- Unicode (2)
- Windows (2)
jQuery
elevateZoom (Requires jQuery)
Microsoft Store (Donation)
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!
Click here to go to this blog's Facebook Page!
Thank you!
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)
Monday, February 26, 2018
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)
- 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)
Subscribe to:
Posts (Atom)