How to implement multiple tab webpages in Ajax and JavaScript #JavaScript

The following two examples will demonstrate how to use JavaScript and/or ajax to implement mult iple tab webpages. http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/

http://www.barelyfitz.com/projects/tabber/example2.html

I have used the first code extensively in one of my applications. The basic ides is: you define a div section. On each click, you change the contents of that div section using Ajax concepts. You could also use Iframe and JavaScript. However, if the pages under different tabs require information from the server side then Ajax is the right choice From: http://sitestree.com/?p=3469
Categories:JavaScript
Tags:
Post Data:2016-07-10 09:38:37

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Some JavaScript stuff that you need to know #JavaScript

What you really need to learn in Javascript? 
								
										

1. Where you can place JavaScript codes? 

Anywhere in the web-pages, ideally in the header section, or in an external file. If you keep 
javascript
 codes in an external file, the codes will be re-usable from different web-pages

2. Some basic programming: 
<script language="javascript" type="text/javascript">
</script> 


<script language="javascript" type="text/javascript"> 
	document.write('<b>Hello World</b>'); 
</script> 

This will only be displayed in javascript enabled browsers.

<script language="javascript" type="text/javascript"> 
	document.write('<a href="script.htm">Page Requiring Javascript</a>'); 
</script> 

3. Variables and their scopes 

<script language="javascript" type="text/javascript"> 
	var hello = 'Hello World'; 
	document.write(hello);
</script> 


var mynum = 5; 
var smokes = false; 
var riches = null; 
var today = new Date;
 
Example use of variables: 
<script language="javascript" type="text/javascript"> 
	var questions = '<p>If you have any questions about this 
 	please <a href="mailto:me@myaddress.com">email me</a>.</p>'; 
	document.write(questions);
</script> 

Another block can refer to questions variables without reassigning the value

<script language="javascript" type="text/javascript"> 
	document.write(questions);
</script> 


variables declared within a function is recognized only withing that function. Variables 
declared 
outside of a 
function is recognized anywhere in the webpage within javascript code from the declaration 
place.
 


4. Operators 

Assignment operators 

<script language="javascript" type="text/javascript"> 
	var rich = 5000; 
	var lotsOfMoney = 100000; 
	rich = lotsOfMoney; 
	document.write(rich);
</script> 

Arithmetic and concatenation operators 

five = two + three; 
profit = income - expenses; 
income = sales * price;
payment = total / instalments; 
option = randnum % choices; 
b = ++a;
c = a++;
d = --a;
e = a--; 


Combination of Operators like c/c++ 

joy += happiness; 
price -= discount; 
capital *= interest; 
pie /= slices;
options %= choice; 

Example use:


<script language="javascript" type="text/javascript"> 
	var singlePrice = 8;
	var bulkPrice = singlePrice * 9;
	document.write('<p>Buy our Widgets $'
	+singlePrice+' for one, $'+bulkPrice+' for ten</p>'); 
</script> 



5. Comparing Variables, Logical statements 

<script language="javascript" type="text/javascript"> 
	var red = 5;
	var blue = 3;
	var match = null;
	if (red == blue) 
	{
		match = 'equal'; 
	} 
	else 
	{
		match = 'unequal'; 
	}
	document.write(red + ' and ' + blue + ' are ' + match); 
</script> 


Other comparison operators: 

if (red > blue)
if (red >= blue)
if (red < blue)
if (red <= blue)
if (red != blue) 



Combining more than one comparison 

if ((red == blue) || (red == green)) 


<script language="javascript" type="text/javascript"> 
	var red = 5;
	var blue = 3;
	var green = 3;
	var match = null;
	
	if ((red == blue) && (red == green)) 
	{
		match = 'equal';
	} 
	else 
	{
		purple = 'unequal';
	}
	document.write(red + ' and ' + blue + ' are ' + match);
</script> 


Comparison in short

red == blue ? match = 'equal' : match = 'unequal'; 


instead of

if (red == blue) 
{
	match = 'equal';
} 
else 
{
      match = 'unequal'; 
}


Example Use:

<script language="javascript" type="text/javascript">
	var discPrice = 25;
	var regPrice = 25;
	var discount = regPrice - discPrice;
	if (discount > 0)
		document.write('<p>Save $'+discount+ ' off the normal price of $' +regPrice+ 'now only 
$'+discPrice+'.</p>');
	else
		document.write('<p>Buy now at our regular cheap price of $' + 
regPrice+'.</p>' ); 
</script>


6. Switch statement in Javascript, very similar to C/C++/Java

use switch instead of multiple if/else if

<script language="javascript" type="text/javascript">
	var red = 1;
	var result = null;
	switch (red) 
	{
		case 1: result = 'one'; break; 
		case 2: result = 'two'; break;
		default: result = 'unknown';
	}
	document.write(result);
</script> 


Example:

<script language="javascript" type="text/javascript"> 
	var message = 0;
	switch (message) 
	{
		case 1: document.write('Merry Christmas'); break;
		case 2: document.write('Happy New Year'); break; 
		case 3: document.write('Happy Easter'); break;
		case 4: document.write('Happy Holidays'); break;
		default: document.write('Welcome');
	}
</script> 


7. Function 
	
	
Defining a function 

function myCode() 
{
	document.write('<b>Hello World</b>'); 
} 

calling a function

myCode()

Example:

function displayMessage() 
{
	switch (message) 
	{
		case 1: document.write('Merry Christmas'); break;
		case 2: document.write('Happy New Year'); break;
		case 3: document.write('Happy Easter'); break;
		case 4: document.write('Happy Holidays'); break;
		default: document.write('Welcome');
	}
}	 


var message = 0;
displayMessage(); 


parameter passing

function writeSentence(argument1,argument2) 
{
	document.write('The '+argument1+' is '+argument2+'.<br />'); 
} 



var a = 'table';
var b = 'chair';
var c = 'red';
var d = 'blue';
writeSentence(a,c);
writeSentence(b,c);
b = 'other ' + b;
writeSentence(b,d); 
writeSentence('table',b); //passing the value directly

Example:

function displayMessage(m) 
{
	switch (m) 
	{
		case 1: document.write('Merry Christmas'); break;
		case 2: document.write('Happy New Year'); break;
		case 3: document.write('Happy Easter'); break;
		case 4: document.write('Happy Holidays'); break;
		default: document.write('Welcome');
	}
} 


In Javascript functions can also return values 

function validField(fld) 
{
	if (fld == '') return false; 
	return true;
} 


function validField(fld) 
{
	return (fld != '');
} 

How to receive returned values and process 
document.write(myField + ' is ');
if (!validField(myField)) 
{
	document.write('not '); 
}
document.write('empty'); 

8. Alert and confirm 

	
alert('Alert Message');  

Will display a message box with the message. Very useful in debugging javascript applications. 


use confirm(), when you need user agreement on an issue. like: 

if (confirm('Select a button'))
{
	alert('You selected OK'); 
}
else 
{
	alert('You selected Cancel'); 
}


9. comments 


// Scrolling Ad Javascript
// copyright 3rd September 2004, by Stephen Chapman 
// permission to use this Javascript on your web page is 
// granted provided that all of the code in this script (including 
// these comments) is used without any alteration 


or


/* Scrolling Ad Javascript
copyright 3rd September 2004, by Stephen Chapman
permission to use this Javascript on your web page is
granted provided that all of the code in this script (including
these comments) is used without any alteration */ 



10. Debugging JavaScript

    Test in different browsers like IE, Mozilla, Firfox, Netscape 
    Enable Javascript and script debugging
    Script debugging usually reside under tools menu under browsing or web development 
sub-options

    
    
    Using alert to check variable values or if you can reach to a particular point of your 
code
    
    use bookmarklets, these are small scripts that can be used as plug in into browsers to 
provide error information.
    
    
    Use firebug in firefox, also use error console under tools menu to debug javascript
 error.
    
    Visual interdev provides Javascript debugging you may also enable external debugging by 
such programs
    
    
11. External javascript


You can place all of your javascript codes to an external file. and use the file 
scripts/functions from any webpage. 
You just need to provide a reference to that external file.

You can provide reference as follows:

http://hello.js 

Note:  do not include any <script> or </script> in the external file. 


12.  Using <noscript> tag:  this tag may help you to provide some information to the
 visitors  
when javascript is disabled or not supported by the browsers.


<script language="javascript" type="text/javascript">
	document.write('<b>Hello Javascript World</b>'); 
</script>

<noscript>Hello World Without Javascript</noscript> 

<noscript>
	This page uses Javascript. Your browser either
	doesn't support Javascript or you have it turned off.
	To see this page as it is meant to appear please use
	a Javascript enabled browser.
</noscript>


13. Objects and properties in Javascript 

var strlen = myField.length; 
var str = mynum.toString(); 

function theLetter(num) 
{
	var str = 'abcdefghijklmnopqustuvwxyz';
	return str.substr(num-1,1);
}

document.write(theLetter(5)); 


14. Arrays in Javascript 

var myArray = new Array(); 

var myArray = new Array('message one',
'message two','message three'); 
document.write(myArray[0]); 
myArray[3] = 'message four'; 


function displayMessage(m) 
{
	var greeting = new Array('Welcome','Merry Christmas',
	'Happy New Year','Happy Easter','Happy Holidays');
	if (m < 0 || m > greeting.length) m = 0;
	document.write(greeting[m]); 

} 

15. Loops

for (var i=0; i<10; i++) 
{
	document.write(i);
} 


var x = 0;
while (x<10) 
{
	document.write(x); 
	x++;
} 

var x = 12;
do 
{
	document.write(x); 
	x++;
} while (x<10) 


16. Date and Time in Javascript

//current date
var myDate = new Date; 


myDate.setDate(15);
myDate.setMonth(3); // January = 0
myDate.setFullYear(2006); 

myDate.setDate(myDate.getDate()+7);

From: http://sitestree.com/?p=3467
Categories:JavaScript
Tags:
Post Data:2016-07-15 23:39:11

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Installing JBOSS Tools in Eclipse #JBOSS

http://player.vimeo.com/video/39743315?portrait=0 From: http://sitestree.com/?p=2637
Categories:JBOSS
Tags:JBOSS, Tool, Eclipse
Post Data:2015-10-20 12:44:11

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Configure Mac OsX for Laravel Development with Valet #Laravel

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
brew update
brew install homebrew/php/php71
composer global require laravel/valet
export PATH=$PATH:~/.composer/vendor/bin


not required
curl -sS https://getcomposer.org/installer | php
curl https://getcomposer.org/installer | php

php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”
php -r “if (hash_file(‘SHA384’, ‘composer-setup.php’) === ‘669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;”
php composer-setup.php
php -r “unlink(‘composer-setup.php’);”
pwd
ls composer.phar
sudo mv composer.phar composer
sudo mv composer /usr/bin/
composer
composer global require laravel/valet
valet install

ls .composer/
ls .composer/vendor/
ls .composer/vendor/laravel/
cd .composer/vendor/laravel/
valet install
echo $PATH
export PATH=$PATH:~/.composer/vendor/bin [should go to bash profile]
echo $PATH
valet install
cd ~/
valet install
ping foobar.dev
valet domain sayed.com
ping sayed.com
brew install mysql
brew services start mysql
sudo nano .bash_history
exit From: http://sitestree.com/?p=10679
Categories:Laravel
Tags:
Post Data:2017-06-30 19:42:07

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Forge: Painless Server Management including Digital Ocean and AWS #Laravel

PAINLESS SERVER MANAGEMENT.

Sure, you can do all of these on your Own in platforms like AWS or Digital Ocean. However, Forge has made them easy and user friendly (you do not have to be an expert on Linux or so)

Numerous Cloud Providers
Choose between AWS, Digital Ocean, Linode, or even your own custom VPS. These are your servers, we just make it easy like Sunday morning.

SSL Certificate Management
Free SSL certificates

Site / Sub-Domain Management
Unlimited domain and sub-domains

Manage Queue Workers

Cron Jobs Made Simple

Load Balancing
Create and manage Nginx load balancing servers.

Horizontal Scaling

Up-To-Date Server Configuration

From: http://sitestree.com/?p=10677
Categories:Laravel
Tags:
Post Data:2017-06-30 18:43:16

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Introduction to Laravel View #Laravel

[youtube https://www.youtube.com/watch?v=jqDToSwfqn8&w=640&h=360] From: http://sitestree.com/?p=10409
Categories:Laravel
Tags:
Post Data:2017-01-07 18:30:42

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Laravel Localization #Laravel

[youtube https://www.youtube.com/watch?v=ad4KG_GOMgQ&w=640&h=360] From: http://sitestree.com/?p=10406
Categories:Laravel
Tags:
Post Data:2017-01-07 18:28:33

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Introduction to Laravel View #Laravel

[youtube https://www.youtube.com/watch?v=jqDToSwfqn8&w=640&h=360] From: http://sitestree.com/?p=10401
Categories:Laravel
Tags:
Post Data:2017-01-03 21:58:59

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

#Engineering: #Canada: #Job/Contract/Project: Any #Engineering: #Computer, #Electrical, #Electronics, #Civil, #Chemical, #Mechanical, #Naval, #Biomedical, and misc Engineering

Date Posted:2021-07-14 .Apply yourself, or submit others as candidates; Build a recruitment team to submit others as candidates; submit RFP to be considered for projects in future; Try to become a vendor so that you are asked to submit consultants/resources in future. If these work for you. This list is posted in this blog everyday provided there are new projects under the criteria

  1. construction-services-10004
  2. Dome and CUP Civil Works
  3. Mechanical Upgrades – AHU 5, 18, 719 & 720
  • electrical-and-electronics-10006
  • Electrical Wire Products
  • Fleet Lighting and Electrical Components
  • engines-turbines-components-and-accessories-10008
  • Provision of Engineering Services for Watermain and Wastewater Main Improvements in The Town Of Oakville, Wards 1, 2, 3 (PR-3314A & PR-3314B)
  • prefabricated-structures-10022
  • DNE1 Stimulus Electrical
  • transportation-equipment-and-spares-10029
  • Fleet Lighting and Electrical Components
  • architect-and-engineering-services-10048
  • Engineering and Architectural Services
  • Consultants for Detailed Design and Engineering Services For Active Transportation Infrastructure
  • RFP for ENGINEERING DESIGN CONSULTANT SERVICES for CALGARY REMAND CENTRE Replace Compressors and Water Cooled Chiller for Kitchen Cooler, Replace HVAC System
  • Engineering Services Tender 2021 & QA for Gravel Crushing
  • Engineering Services for Intersection Improvement Program
  • Request for Engineering Services for the Rehabilitation of Acton Island Bridge
  • environmental-services-10050
  • Prime Consultant Landscape Architecture or Civil Engineering Consultant Services for David Thompson Corridor Infrastructure Safety Upgrades
  • operation-of-government-owned-facilities-10039
  • Engineering Services for Intersection Improvement Program
  • Owner’s Engineering Services for the Bow River Bridge
  • professional-administrative-and-management-support-services-10040
  • Engineering and Architectural Services
  • research-and-development-r-d-10036
  • Engineering Services for Intersection Improvement Program
  • special-studies-and-analysis-not-r-d-10047
  • Digester 4 Condition Assessment and Feasibility Study from the 20-117 Wastewater Engineering Services Pre-Qualification
  • Keywords Used:engineer,civil,mechanical,electrical,electronics,mechatronics,naval,biomedical,computer engineer,software engineer,civil engineer,biomedical,electrical engineer,electronics engineer,mechanical engineer,metallurgical,chemical engineer,industrial engineer,communications engineer,quality assurance engineer,Aerospace engineer,aeronautical engineer,Engineering manager,Agricultural Engineer,Automotive Engineer,Environmental Engineer,Geological Engineer,Marine Engineer,Petroleum Engineer,Acoustic Engineer,Acoustic Engineer,Aerospace Engineer,Agricultural Engineer,Applied Engineer,Architectural Engineer,Audio Engineer,Automotive Engineer,Biomedical Engineer,Chemical Engineer,Civil Engineer,Computer Engineer,Electrical Engineer,Environmental Engineer,Industrial Engineer,Marine Engineer,Materials Science Engineer,Mechanical Engineer,Mechatronic Engineer,Mining and Geological Engineer,Molecular Engineer,Nanoengineering,Nuclear Engineer,Petroleum Engineer,Software Engineer,Structural Engineer,Telecommunications Engineer,Thermal Engineer,Transport Engineer,Vehicle Engineer,engineering

    #Canada: #IT Jobs:#Consultants, #Contractors, #Analysts, #Engineers, #Developers, #Technology Consultants, #IT-Consultants Opportunities2021-07-14

    Apply yourself, or submit others as a candidate, Build a recruitment team to submit others as a candidate, submit RFP to be considered for projects in future, Try to become a vendor so that you are asked to submit consultants/resources in future

    1. construction-services-10004
    2. Consultant Services-Landfill Closures-Western & Baie Verte – Green Bay Regions
  • energy-10007
  • Source List (SL) for Environmental Consulting Services
  • Prime Consultant for Main Building Foundation Repairs & Site Grading
  • fire-fighting-security-and-safety-equipment-10010
  • Source List (SL) for Environmental Consulting Services
  • architect-and-engineering-services-10048
  • REQUEST FOR PROPOSAL (RFP) for PRIME CONSULTANT SERVICES for EDMONTON – YELLOWHEAD YOUTH CENTER CAMPUS UPGRADES
  • RFP for ENGINEERING DESIGN CONSULTANT SERVICES for CALGARY REMAND CENTRE Replace Compressors and Water Cooled Chiller for Kitchen Cooler, Replace HVAC System
  • REQUEST FOR PROPOSAL (RFP) for PRIME CONSULTANT SERVICES for EVANSBURG – GRAND TRUNK K-12 SCHOOL MODERNIZATION (SOLUTION FOR EVANSBURG AND WILDWOOD) 2021 School Capital Announcement
  • communications-photographic-mapping-printing-and-publication-services-10042
  • Environmental and Survey Consultant Services for Highway-774 Wildlife Road Crossing Study and Fence Line Survey
  • PQR for Destination Development, Management Research and Analytic Consulting Services
  • PQR for Research and Analytic Consulting Services
  • Incremental Specification and standardization of Maps for the Web (NRCan-5000059855)
  • educational-and-training-services-10043
  • Anti-Racism & Anti-Discrimination Exploratory Working Group (AREWG) Consultant
  • environmental-services-10050
  • Environmental and Survey Consultant Services for Highway-774 Wildlife Road Crossing Study and Fence Line Survey
  • Prime Consultant Landscape Architecture or Civil Engineering Consultant Services for David Thompson Corridor Infrastructure Safety Upgrades
  • Consulting Services for Mill Creek Improvements
  • G85-405 – ENVIRONMENTAL CONSULTING SERVICES – TRIENNIAL CONTRACT
  • financial-and-related-services-10038
  • RQQ-2020-FACA-499: VOR + 2nd Stage- Provide Accounting & Tax Consulting Services
  • Request for Proposal (RFP) for Actuarial and Pension Consulting Services
  • health-and-social-services-10052
  • Psychology Consulting and Quality Assurance Services
  • information-processing-and-related-telecommunications-services-10049
  • Consultant Services for an Information Technology Strategic Plan (ITSP)
  • Consulting Services: Connected Community Strategy
  • Environmental and Survey Consultant Services for Highway-774 Wildlife Road Crossing Study and Fence Line Survey
  • operation-of-government-owned-facilities-10039
  • P77PB21274 – ATC PROJECT CONTROL CONSULTING SERVICES
  • professional-administrative-and-management-support-services-10040
  • Professional Consulting Services for 2022 Local and Industrial Renewal Programs
  • Anti-Racism & Anti-Discrimination Exploratory Working Group (AREWG) Consultant
  • quality-control-testing-inspection-and-technical-representative-services-10053
  • Source List (SL) for Environmental Consulting Services
  • research-and-development-r-d-10036
  • Specialist Environmental Consulting Services
  • CON0022036, Regional Bridge Consultant – Peace Region
  • special-studies-and-analysis-not-r-d-10047
  • Anti-Racism & Anti-Discrimination Exploratory Working Group (AREWG) Consultant
  • Consulting Services – Construction Material Salvage & Recycling Market Assessment
  • undefined-10055
  • RQQ-2020-FACA-499: VOR + 2nd Stage- Provide Accounting & Tax Consulting Services
  • EPS/BLRS Web Surveillance Solution for Short-Term Rentals in the City of Ottawa