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)

Tuesday, November 20, 2018

JavaScript - Apply CSS Style In Scope

This method associates unique Ids to desired elements and then CSS Styles can be applied to them!

Test code here (Click)!

appendChild() in use:


document.write() in use:





Keywords:
JavaScript - Apply CSS Style In Scope
JavaScript - Elements Unique Id

Monday, November 19, 2018

JavaScript - Static Variables\Objects For Functions (IIFE Alternative)


Manually associate unique "Global_Static_Objects" to functions alternative! (Click here)
 
Automatically associate unique "Global_Static_Objects" to functions alternative by pre-editing scripts! (Click here)

Test code here (Click)!





Keywords:
JavaScript - Static Variables\Objects For Functions (IIFE Alternative)
JavaScript - Static Variables For Functions (IIFE Alternative)
JavaScript - Static Objects For Functions (IIFE Alternative)

Sunday, November 18, 2018

JavaScript - String Swap (No Delimiters Required)

This method (click here) requires #@ and #! Delimiters!

The below method does not require delimiters:

Test code here (Click)!

Example1


Example2


Example 3 - using Matched Subpatterns




Keywords:
JavaScript - String Swap (No Delimiter Required)
JavaScript - Word Swap (No Delimiter Required)
JavaScript - Text Swap (No Delimiter Required)
JavaScript - Replace Multiple Strings At Once

Friday, November 16, 2018

JavaScript - Static Objects For Functions

The code below is based on this code (Click for more infos)!

Test code here (Click)!

- Place functions inside the "<textarea>" element!
- Add "@@@_Create_Local_Static_Objects_@@@" inside each function and the code will automatically create a "Static" and "Local" objects for them!

The functions will be Pre-Edited then they will be written to the document (DOM)!





keyword:
JavaScript - Static Objects For Functions
JavaScript - Local Objects For Functions
JavaScript - Pre-Edit Script
JavaScript - Script Pre-Edition
JavaScript - Pre-Edit Html
JavaScript - Html Pre-Edition

Wednesday, November 14, 2018

JavaScript - Alternative for Functions Static Variables!

This method basically allows you to use "Local" object to store functions local values and "Static" object to store functions static values!

To create the functions "Static" objects, use unique global variable names based on the function name itself such as "Function_Test_Function", "Function_ScreenGet_Function",  "Function_Calculate8776_Function", "Class_Function_Test_Class", etc, etc, etc ...!



When a function returns, javascript automatically clears all its "Local" variables values!

If you need a value to be remembered between the function calls, you need to store that value in a "Static" variable of that same function!

Unfortunately, javascript does not support functions "Static" variables! (Most languages that I know support it!)

So, an alternative is:

 - lets say your function name is "Test"

 - inside the function, create a "global" object based on your function's name, example: "Function_Test_Function"

 - inside the function, declare "Static" variable as local object by passing the reference of "Function_Test_Function" object inside it!

 - now you can store static values of your function through the local "Static" object, example: Static.x, Static.y, Static.data, etc, etc

note that:

 - using "Static.x" or "Function_Test_Function.x" is the same thing, but the former is more practical to use then the latter!

 - both "Static" or "Function_Test_Function" variables reference the same object stored in the ram memory!

 - "Static" or "Function_Test_Function" variables don't contain the object's values, they contain only a reference to an object stored in the memory!



Keywords:
JavaScript - Alternative for Functions Static Variables!

Wednesday, September 12, 2018

JavaScript - String Swap (Replace Multiple Strings At Once)




Keywords:
JavaScript - String Swap
JavaScript -Replace Multiple Strings At Once

Monday, February 26, 2018

JavaScript - Non-RegEx String Replace Function

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)

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)

ADS - Multi Share Calculator

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