Get page size


Hits: 1265  

function get_page_size() {

var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = new Array(w,h);
return arrayPageSize;

}

Change Images


Hits: 1244  

/*
change image on mouseover and click
*/
function mEvent(id,img1,img2,img3) {
var i = new String();
i = document.images[id].src;
document.images[id].src = i.replace(img2,img1);
//for click condition
if(document.images[id].src.indexOf(img3)!=-1)
document.images[id].src = i.replace(img3,img1);
}

Templates Search Made Easy


Hits: 1511  

Suppose you want to search joomla/wordpress templates and find the site for all these templates, here you have to navigate entire templates with all pages. This will waste your time and internet band width….
www.bestofjoomla.com
The best way to navigate all template in few seconds:

Google Image Search
Google Image Search
Google Search Results
Google Search Results

This will save your time and band width…..

Here on result page you can select your favorite template and browse that one inspite of navigating all www.bestofjoomla.com pages….

Happy Searching 🙂

Form’s array element in javascript


Hits: 1409  

How to access form’s array element in javascript?

Web Post
Mobile Post
Application Post
Open Source Post

Solution:

<form action=”<?=$_SERVER[‘PHP_SELF’]?>” method=”post”>

<input name=”post[]” type=”checkbox” value=”web” /> Web Post
<input name=”post[]” type=”checkbox” value=”mobile” /> Mobile Post
<input name=”post[]” type=”checkbox” value=”application” />Application Post
<input name=”post[]” type=”checkbox” value=”open” /> Open Source Post

</form>

<script type=”text/javascript”>
for(i=0;i
{

if(document.sv.elements[i].type==”checkbox” && document.sv.elements[i].name==”post[]”)
{

if(document.sv.elements[i].checked==true)
alert(document.sv.elements[i].value);

}

}
</script>