Category: "JavaScript"

Web Development/Engineering

Great resources:

Mozilla/Firefox - plugins Firebug, CSSmate/CSSedit, YSlow
XAMPP - http://www.apachefriends.org/en/xampp.html

The Back/Forward buttons

If you have post data, the browser will alert you on Back/Forward buttons. Sometimes, this is inconvenient. An option is to calculate the length of the GET string, and if it is within your tolerance, whatever that may be, change the form method to “GET".

Works great. Very little effort. Code includes dojo.


/* Check to see if you can create a get string of less than 255 characters */
var aInputs=('id_of_first_input','id_of_second_input','etc');
var l=aInputs.length;
for (i=0;i<l;i++)
	if (dojo.byId(aInputs[i]) != null)	
		sD+=aInputs[i]+'='+dojo.byId(aInputs[i]).value+'&';
if (sD.length < 255)
	frm.method='get';

* Within your tolerance refers to the fact that different browsers and servers may function … differently.

Ini processing into javascript


<html>
<body>
<?php
$ini_array=parse_ini_file('lxtest/ini/system.ini.php');
echo '<pre>';
var_dump($ini_array);
echo '</pre>';
echo '<hr />';
extract ($ini_array);
echo 'Database: '.$database.'<br />';
?>
<?=$database?>
</body>
<script>
alert("<?=$password?>");
</script>
</html>

This is the beginning of an adventure - to use PHP to inject strings into javascript for AJAX applications. Multi-lingual, fast and efficient. More posts later. Will probably require Apache adjustments to run .js files through PHP, but that’s okay!!!

:D

1 2 3 4 ...5 ...6 7 8 10