11/18/2009

Display Images Randomly on my web page





If you want to display images randomly, one at a time in your web page you can use the following html code.

First you should put this code inside the head tag


<
HEAD>

<
SCRIPT language="javascript">
function RandomImageLong(images,iparams)
{
si = 0;
ci=0;
cc=0;
imageSet = new Array();
ei = images.length;
for (i=1;i if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
imageSet[cc] = images.substring(si,i);
cc++;
si=i+1;
}
}
ind = Math.floor(Math.random() *cc);
document.write("<
img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\">");
}

function RandomImage(images)
{
RandomImageLong(images," ");
}

function RandomImageLinkLongTarget(images,urls,iparams,hparams)
{

imageSet = new Array();
urlSet = new Array();
si = 0;
ci=0;
cc=0;
ei = images.length;
for (i=1;i if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
imageSet[cc] = images.substring(si,i);
cc++;
si=i+1;
}
}
ind = Math.floor(Math.random() *cc);
si = 0;
ci=0;
cc=0;
ei = urls.length;
for (i=1;i if (urls.charAt(i) == ' ' || urls.charAt(i) == ',') {
urlSet[cc] = urls.substring(si,i);
cc++;
si=i+1;
}
}

document.write("<
a "+hparams+" href=\""+urlSet[ind]+"\"><
img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\">");
}

function RandomImageLinkLong(images,urls,iparams)
{
RandomImageLinkLongTarget(images,urls,iparams,"");
}

function RandomImageLink(images,urls)
{
RandomImageLinkLongTarget(images,urls,"border=0","");
}

<
/SCRIPT>
<
/HEAD>

Then you should put the following code inside the body and the place where you want to display the image

<
BODY>

<
SCRIPT>

RandomImageLong("image1.jpg image2.jpg image3.jpg image4.jpg ","width=152 height=136");

<
/SCRIPT>
<
/BODY>


I get this from http://www.bloke.com/javascript/Random/ ,you can visit that for more information.

11/09/2009

Handle MGCplus Programmaticaly using Vb.net






This URL contains the code for handling MGCplus using Vb.net

http://mgcplusconnect.blogspot.com/

Incoming search keywords to this post

how to program MGCplus, handling mgcplus, calibrate the load cell using mgcplus, connect mgcplus using vb.net, use vb6 to connect mgcplus, make software to connect mgcplus, how to connect mgcplus using software, how to use mgcplus, what is load cell, load cell calibration, mgcplus calibration, mgcplus and vb.net, .net use for connect mgcplus, get inputs from mgcplus, issue commands for mgcplus

11/06/2009

How to Play Background sound in your web page





If you wish to play a background sound automatically when display the web page you can use the following html code for that

<
embed src="musicfile.filetype" autostart="true" loop="true" width="2" height="0" >
<
/embed>


In the above code you can use either loop true or false.If use loop equals true then the sound file play repeatedly to the closing of web page.If use loop equals false the sound file play exactly one time.

You can also use the following code.

<
HEAD>
<
bgsound src="music/song.mp3" loop="-1">
<
/HEAD>

You can give the value to the loop.Loop equals -1 means the sound repeatedly play until close the page and also you can give number for the loop for represent the exact times you want to play the sound.