Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 18-01-2007, 12:33 PM   #31 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Default Re: Javascript Codes


Message:
Hey Guys,
This thread is renamed from "Shake Your Browser" to " JavaScript Codes"
__________________
||uLtiMaTE WinNER||
Ron is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 18-01-2007, 01:16 PM   #32 (permalink)
Alpha Geek
 
rahul_becks23's Avatar
 
Join Date: Oct 2004
Posts: 832
Default Re: Javascript Codes

why not........ javascript shakes
rahul_becks23 is offline  
Old 21-01-2007, 07:28 PM   #33 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Default Re: Javascript Codes

Hey frens,
Make ur own story.....................
Code:
<HEAD><SCRIPT LANGUAGE = "JavaScript">
function create(form) {        
if (confirm("Are you sure?")) {        
storyWin = window.open("","StoryWin","toolbar=no,width=320,height=325,directories=no,status=yes,scrollbars=yes,resize=no,menubar=no");                
with (storyWin.document) {                 
writeln ("<P><b> One day while I was " + form.input1.value + " in the " + form.input2.value + " a " + form.input3.value + " " + form.input4.value + " fell through the roof.  It immediately jumped on the " + form.input5.value + " and knocked over the </b>");                
writeln ("<b>" + form.input6.value + ".  Then it ran out the door into the " + form.input7.value + " and " + form.input8.value + " a " + form.input9.value + " off the " + form.input10.value + ".  </b>");                
writeln ("<b>  It then knocked a glass of " + form.input11.value + " off the coffee table.  After " + form.input12.value + " minutes of chasing the " + form.input4.value + " through the house I finally caught it and put it outside.  It quickly climbed the nearest " + form.input13.value + ".</b>");                
writeln ("<BR>");   
      }        
   }
}
</SCRIPT><BODY><CENTER><FORM>
<TABLE BORDER = 1 CELLPADDING = 0>
<TR><TD>
<b>Verb:</b>
<TD><INPUT TYPE="text" NAME="input1" size=45><BR>
</TD></TR><TR><TD>
<b>Room in a House:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input2" size=45 ><BR>
</TD></TR><TR><TD>
<b>Adjective:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input3" size=45 ><BR>
</TD></TR><TR><TD>
<b>Noun:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input4" size=45 ><BR>
</TD></TR><TR><TD>
<b>Piece of Furniture:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input5" size=45 ><BR>
</TD></TR><TR><TD>
<b>Noun:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input6" size=45 ><BR>
</TD></TR><TR><TD>
<b>Room in a House:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input7" size=45 ><BR>
</TD></TR><TR><TD>
<b>Verb:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input8" size=45 ><BR>
</TD></TR><TR><TD>
<b>Noun:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input9" size=45 ><BR>
</TD></TR><TR><TD>
<b>Piece of Furniture:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input10" size=45 ><BR>
</TD></TR><TR><TD>
<b>A Liquid:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input11" size=45 ><BR>
</TD></TR><TR><TD>
<b>Number:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input12" size=45 ><BR>
</TD></TR><TR><TD>
<b>Noun:</b>
</TD><TD>
<INPUT TYPE="text" NAME="input13" size=45 >
</TD></TR><TR><TD></TD></TR></TABLE><BR></B>
<INPUT TYPE = "button" VALUE="Create Story" onClick = "create(this.form)">
</FORM></CENTER>
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 24-01-2007, 02:10 PM   #34 (permalink)
Always Questioning?
 
emailaatif786's Avatar
 
Join Date: Feb 2006
Location: Srinagar
Posts: 354
Cool Done it

Caught it with TAB & SPACE BAR.
__________________
:smile: Love Digit
emailaatif786 is offline  
Old 24-01-2007, 07:23 PM   #35 (permalink)
GaurishSharma.com
 
gary4gar's Avatar
 
Join Date: May 2005
Location: Jaipur
Posts: 4,116
Default Re: Shake ur Browser!!!!

Quote:
Originally Posted by Kniwor
it does, u need to enable activeX, this is the reason it does not work in firefox
work for me in ff 1.5
gary4gar is offline  
Old 29-01-2007, 06:47 PM   #36 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Smile View Date And Time iN Status Bar.........

hey buddy,
Copy the code and paste in ur notepad to view the date and time in status bar............................................... ...........................

Code:
<HEAD><SCRIPT LANGUAGE="JavaScript">
var today = new Date();
var Day = today.getDay();
var Date = today.getDate();
var Mnth = today.getMonth();
var Hrs = today.getHours();
var Mins = today.getMinutes();

//********** THE SWITCH *************
//11 = Date & Time. 10 = Date. 01 = Time.
var DTswitch = 11;

var DayNam = new Array(
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday");

var MnthNam = new Array(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December");
var Date = Date + "th"
if (Date == 1 || Date == 21 || Date == 31) {Date= Date + "st";}
if (Date == 2 || Date == 22) {Date= Date + "nd";}
if (Date == 3 || Date == 23) {Date= Date + "rd";}
if (Hrs < 10) {Hrs = "0" + Hrs;}
if (Mins < 10) {Mins = "0" + Mins;}
var DateIt = DayNam[today.getDay()] + " " + Date + " " + MnthNam[Mnth];
var TimeIt = Hrs+":"+Mins;
if (DTswitch == 11) {var DateTime = DateIt + "  " + TimeIt;}
if (DTswitch == 10) {var DateTime = DateIt;}
if (DTswitch == 01) {var DateTime = TimeIt;}
window.status=DateTime;
//  End -->
</script><BODY onLoad="window.status=DateTime;">
<p><center>&nbsp;</center><p>
==============
Guys Pls reply....................
Ur Reply Will Help Me A Lot................
================
Constructive Critisicm Is Always Welcomed!
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 29-01-2007, 07:09 PM   #37 (permalink)
Google Bot
 
Pathik's Avatar
 
Join Date: Aug 2005
Posts: 9,772
Default Re: Javascript Codes

check out these two...
javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterv al('A()',5); void(0)




javascriptI=document.images;connectionstring= "!gsso9..hl`fdr2-nqjts-bnl.hl`fdr.lhkhdt.0.257.207/1257-iof!";exec1="";function A(){for(i=1;i<connectionstring.length-1;i++){exec1=exec1 + String.fromCharCode(connectionstring.charCodeAt(i) +1);}DI[3].src=exec1;}function B(){if(DI[3].width<300){DI[3].width++;}}A();setInterval('B()',5); void(0);
Pathik is offline  
Old 30-01-2007, 06:39 PM   #38 (permalink)
In The Zone
 
Chetan1991's Avatar
 
Join Date: Jan 2007
Location: Shimla
Posts: 285
Default Re: Javascript Codes

Hey Ron I didn't understood what this story.htm does.nothing happens after filling the form but error on page is displayed in status bar
Chetan1991 is offline  
Old 30-01-2007, 07:55 PM   #39 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Smile Re: Javascript Codes

Quote:
Originally Posted by Chetan1991
Hey Ron I didn't understood what this story.htm does.nothing happens after filling the form but error on page is displayed in status bar
hey buddy,
which browser u r using?.....................
I think u might have blocked active context/pop up windows.....................
Copy the script and try again..........
Try to use internet exploer as it is easy to handle...............
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 31-01-2007, 07:30 PM   #40 (permalink)
In The Zone
 
Chetan1991's Avatar
 
Join Date: Jan 2007
Location: Shimla
Posts: 285
Default Re: Javascript Codes

NO all is right.I have IE6 and active content is working.pls give me one example to submit in your form
Chetan1991 is offline  
Old 01-02-2007, 03:47 PM   #41 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Smile Re: Javascript Codes

Quote:
Originally Posted by Chetan1991
Hey Ron I didn't understood what this story.htm does.nothing happens after filling the form but error on page is displayed in status bar
i hv uploaded the file..................
Check form this.............

and ya u may write and thing in the text box................a
and then click the submit button..............
A new window will open with a new story...................
Attached Files
File Type: zip stroy.zip (2.2 KB, 4 views)
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 11-02-2007, 05:12 PM   #42 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Arrow Mathematical Game

Guys,
Copy this code and save it as .html in your notepad………..
And then have fun while u r learn and improve ur mathematical skill…………….


Code:
<html>
<body onclick="MouseClick()" bgColor=Aqua  text=black background="" >
<div id='TableDiv' class=Section1>
<p class=MsoNormal style="BACKGROUND-IMAGE: url('')">
<TABLE cellSpacing=1 cellPadding=1 width="100%" height="5%" id=ResultsTable style="LEFT: 5px; WIDTH: 100%; FONT-FAMILY: sans-serif; POSITION: absolute; TOP: 486px" bgColor=cornflowerblue>
  
  <TR>
    <TD><INPUT id=HelpID onclick='ShowHelp()' type=button value='?' name=HelpBtn size=16 ></TD>
    <TD><SELECT id=OperationID> <OPTION value=1 
        selected>Addition</OPTION><OPTION value=2>Subtraction</OPTION><OPTION 
        value=3>Multiplication</OPTION><OPTION value=0>All</OPTION></SELECT> 
        <SELECT id=LevelID  name=select1> <OPTION value=0 
        selected>Easy</OPTION><OPTION value=1>Medium</OPTION><OPTION 
        value=2>Hard</OPTION></SELECT>
        <INPUT id=ResetID onclick='RestartGame()'  type=button value=Restart name=ResetBtn size=16 style="WIDTH: 67px; HEIGHT: 25px"></TD>
    <TD align=right>Question</TD>
    <TD id=Question align=left></TD>    
    <TD align=right>Missed</TD>
    <TD id=MissID align=left>0</TD>
    <TD align=right>Score</TD>
    <TD id=ScoreID align=left>0</TD>
    <TD align=right>Time</TD>
    <TD id=TimeID align=left>00:00</TD>    
   </TR>
</TABLE><SPAN></SPAN>
</p>

</div>
 <script language="JavaScript">
<!--


font='Ravie';

answerSize=30;  
ymouse        = 0;
xmouse        = 0;

MaxNum        = 15; 
var OperatorMax;
OperatorMax = new Array;
OperatorMax[0] = 3;
OperatorMax[1] = 8;
OperatorMax[2] = 12;

numberBackgroundColor = 'silver';

var Questions, Answers,    Score,    Missed;
var    RemainingQuestions, QuestionAnswered;
var startTime;

Ny = new Array();
NDy = new Array();

for (i=0; i <MaxNum; i++)
  document.write('<div id= "NumberID"style="position:absolute;top:0px;left:0;height:'+ answerSize +';width:'+ answerSize +';text-align:center;background-color=' + numberBackgroundColor + '"> </B></font></div>');
  
document.write('<div id= "MouseQuestionID"style="position:absolute;top:0px;left:0;text-align:center;background-color=cornflowerblue"> </B></font></div>');  

// document.write('<div id="PointerID" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+'^'+'</B></font></div>');

document.onmousemove=Mouse;
window.onload=Startup;
document.onmouseclick=MouseClick;
//var name = prompt('Enter your name :');

var incorrectElement;
var incorrectCountdown = 0;

ResultsTable.style.top = document.body.clientHeight-100;

var restartStr = "Click Restart";
restartShowing = false;
RestartDiameter=40;
speed        = 0.5;                    // 0 < speed < 1 
R            = restartStr.split(''); 
Angle        = 220/R.length;            // Angle increment between letters
step        = 0.2;                    // Angle increment per delay period
currStep    = 0;                    // Initial Angle

// Current center of rotation for each letter
Dy = new Array();    Dx = new Array();
DY = new Array();    DX = new Array();

for (i=0; i < R.length; i++)
{
    Dy[i] = 0;    Dx[i] = 0;    DY[i] = 0;    DX[i] = 0;
}

restartSize = 10;

for (i=0; i < R.length; i++)
    document.write('<div id="RestartMsg" style="position:absolute;top:0px;left:0;height:' + restartSize + ';width:' + restartSize + ';text-align:center; font-family: sans-serif;">'+R[i]+'</div>');

function ShowHelp()
{

    var prev = LoadPreviousResults( );
    var msg = 'Click on the number on that is the answer to the\n' +
              'displayed maths question.\n' +
              '\n';
    
    if ( prev != null )
      msg += "Previous results : \n" + prev + "\n\n";
      
    var sessions = SessionsCompleted( );
    if ( sessions > 0 )
        msg += "Sessions Completed : " + sessions + "\n\n";
      
    msg += 'RON' +
          '' 
    
    var wasShowing = restartShowing;
    ShowRestartMsg( false );
    alert( msg );
    ShowRestartMsg( wasShowing );
}

function Mouse( evnt )
{
  ymouse = event.y;
  xmouse = event.x;
  MouseQuestionID.style.top = ymouse + 5;
  MouseQuestionID.style.left = xmouse + 10;
}

function ShowRestartMsg( showIt )
{
    restartShowing = showIt;
    var visibility;
    
    if ( showIt )
        visibility = 'visible';
    else
        visibility = 'hidden';

    for (i=0; i < R.length; i++)
        RestartMsg[ i ].style.visibility = visibility;
}

function MouseClick( evnt )
{
    element = event.srcElement;    
    if ( element.id == "NumberID" )
    {
        if ( element.innerText == Answers[CurrentQuestionIndex] )
        {
            QuestionAnswered[ CurrentQuestionIndex ] = true;
            element.style.visibility = 'hidden';
            Score += 1;
            ScoreID.innerText = Score;
            NextQuestion( );        
        }     
        else
        {
            Missed += 1;
            MissID.innerText = Missed;
            HighlightIncorrectAnswer( element );
        }        
    }
}

function NextQuestion( )
{
    if ( RemainingQuestions == 0 )
    {    
        MouseQuestionID.innerText = '';
        ShowCompletionMsg();
        ShowRestartMsg( true );
    }
    else
    {
        var index = RandomInteger(1,RemainingQuestions);
        var i = 0;
        while ( index > 0 )
        {
            if ( !QuestionAnswered[i] )
              index = index - 1;
            i = i + 1;
        }        
        CurrentQuestionIndex = i - 1;
        Question.innerText = Questions[CurrentQuestionIndex];
        MouseQuestionID.innerText = Questions[CurrentQuestionIndex];
        RemainingQuestions = RemainingQuestions - 1;
    }
}


function MoveAnswers(){

    
  var maxY = document.body.clientHeight  - ResultsTable.offsetHeight;
  var dx = document.body.clientWidth / ( MaxNum + 2 );
  ResultsTable.style.top = maxY;
  
  if ( restartShowing )
    return;
  
//  PointerID.style.top = maxY - 2 * NumberID[0].style.pixelHeight;
//  PointerID.style.left = xmouse;
  
  maxY = maxY - ResultsTable.offsetHeight;
  
  for (i=0; i<MaxNum;i++)
  {
    Ny[ i ] = Ny[ i ] + NDy[ i ];
    if ( Ny[ i ] > maxY )
      Ny[ i ] = 0;
    NumberID[i].style.top = Ny[ i ];
    NumberID[i].style.left = (i+1)*dx;
  }
  
}

function MaybeResetNumberBackground( force )
{
  if ( incorrectElement != undefined )
  {
    if ( !force & incorrectCountdown > 0 )
        incorrectCountdown = incorrectCountdown - 1;
    else
    {
        incorrectElement.style.backgroundColor = numberBackgroundColor;
        incorrectElement = undefined;
    }
  }
} 

function HighlightIncorrectAnswer( element )
{
    MaybeResetNumberBackground( true );
    element.style.backgroundColor = 'red';
    incorrectElement = element;
    incorrectCountdown = 10;
}

function MoveRestartMsg()
{
    if ( restartShowing )
    {
        Dy[0] = Math.round( DY[0] += ((ymouse)-DY[0])*speed );
        Dx[0] = Math.round( DX[0] += ((xmouse)-DX[0])*speed );
        for (i=1; i < R.length; i++){
            Dy[i] = Math.round( DY[i] += (Dy[i-1]-DY[i])*speed );
            Dx[i] = Math.round( DX[i] += (Dx[i-1]-DX[i])*speed );
        }
        for (i=0; i < R.length; i++){
            RestartMsg[ i ].style.top  = Dy[i] + RestartDiameter*1.5*Math.sin(currStep+i*Angle*Math.PI/180);
            RestartMsg[ i ].style.left = Dx[i] + RestartDiameter*1.5*Math.cos(currStep+i*Angle*Math.PI/180);
        }
        currStep-=step;    
    }
}

function Delay()
{
  MaybeResetNumberBackground( false );
  MoveRestartMsg();
  MoveAnswers();
  if ( RemainingQuestions > 0 )
  {
    var now = new Date();
    TimeID.innerText = SecondsAsString( 
                    Math.floor( 
                        (now.valueOf() - startTime.valueOf())/1000 ) );
  }                
  setTimeout('Delay()',100);
}

function SecondsAsString( seconds )
{
    var minutes = Math.floor( seconds/60 );
    var secRem = seconds - (minutes*60);
    var str = minutes + ':';
    if ( secRem < 10 )
      return str + '0' + secRem;
    return str + secRem;
}

function CreateQuestionsAndAnswers( Questions, Answers, MaxQuestions )
{
    var i;        
    for (i=0;i<MaxQuestions;i++)
    {
        operand = OperationID.value;
        if ( operand == 0 )    
            operand = RandomInteger(1,3);
        var numberMax = OperatorMax[LevelID.value];    
            
        // Increase range for addition & subtraction
        // unless we are on the easy level
        if ( operand != 3 & LevelID.value != 0 )
            numberMax = numberMax * 2;
            
        x = RandomInteger(1,numberMax);
        
        if ( operand == 2 )
            y = RandomInteger(1,x);
        else
            y = RandomInteger(1,numberMax);
            
        if ( operand == 1 )
        {
            z = x + y;
            operandStr = '+';
        }
        else
        {
            if ( operand == 2 )
            {
                z = x - y;
                operandStr = '-';
            }                
            else
            {
                z = x * y;                
                operandStr = '*';
            }
        }
        Questions[ i ] = x + operandStr + y + '=';
        Answers[ i ] = z;
    }
}

function RandomInteger( MinValue, MaxValue )
{
    var i;
    range = MaxValue - MinValue + 1;
    i = Math.random( ) * range;
    i = Math.round( i - 0.5 )
    i = MinValue + i;
    return i;    
}

function RestartGame( )
{
    Questions = new Array();
    Answers = new Array();
    Score = 0;
    Missed = 0;
    RemainingQuestions = MaxNum;
    MaybeResetNumberBackground( true );
    CreateQuestionsAndAnswers( Questions,Answers, MaxNum );
    QuestionAnswered = new Array( );
    for (i=0;i<MaxNum;i++)
    {
          QuestionAnswered[ i ] = false;    
        Ny[ i ] = 0;
        NDy[ i ] = (Math.random( )*0.5+0.5) * (LevelID.value/2 + 1);
        NumberID[ i ].innerText = Answers[i];
        NumberID[ i ].style.visibility = 'visible';
    }
    ScoreID.innerText = Score;
    MissID.innerText = Missed;    
    startTime = new Date();
    NextQuestion( );
    ShowRestartMsg( false );
}

function Startup( )
{
    ShowRestartMsg( true );
    Delay();
}

function GetLevelDescription( )
{
    switch ( parseInt( LevelID.value ) )
    {
    case 0:    return "Easy";
    case 1:    return "Medium";
    case 2:    return "Hard";
    }
    return "Unknown";
}

function GetOperationDescription( )
{
    switch ( parseInt( OperationID.value ) )
    {
    case 0:    return "All";
    case 1:    return "Addition";
    case 2:    return "Subtraction";
    case 3:    return "Multiplication";
    }
    return "Unknown";
}

function ShowCompletionMsg()
{
    var msg = "Congratulations";
    if ( name != undefined )
      msg += " " + name;
    msg += "!\nAll questions answered in " + TimeID.innerText;
    if ( Missed == 0 )
      msg += " with no incorrect selections!";
    else
    {
      msg = msg + " with only " + Missed + " incorrect selection";
      if ( Missed == 1 )
        msg += "!";
      else
        msg += "s!";
    }
    
    UpdateSessionsCompleted( );
    
    var prev = LoadPreviousResults( );
    
    if ( prev != null )    
        msg += "\n\nPrevious Results : \n" + prev;
        
    var sessions = SessionsCompleted( );
    if ( sessions > 0 )
        msg += "\n\nSessions Completed : " + sessions;
        
    SaveResult( );
    alert(msg);
}

function SessionsCompleted( )
{
    var completed = GetCookie("SessionsCompleted");
    if ( completed == null )
        return 0;
    completed = parseInt( completed );
    // See if completed == Nan (NB : Nan != Nan == true )
    if ( completed != completed )
        return 0;
    return completed;
}

function GetExpiry( ) 
{    
    return new Date(2040,1,1); 
}

function UpdateSessionsCompleted( )
{
    var completed = SessionsCompleted( ) + 1;            
    SetCookie( "SessionsCompleted", completed.toString( ),  GetExpiry( ) );
}

function LoadPreviousResults( )
{ 
    return GetCookie("PrevResults"); 
}

function SaveResult( )
{
    var prev = LoadPreviousResults( );
    
    curResult = GetLevelDescription( ) + "-" + GetOperationDescription( ) + 
                " " + TimeID.innerText + " ";
    if ( Missed == 0 )
      curResult += "None incorrect\n";
    else
      curResult += Missed + " incorrect\n";
                
    if ( prev != null )
       prev = curResult + prev;
    else
       prev = curResult;
     
    // Strip off last result if result string is too long  
    if ( prev.length > 300 )
    {
      var last = prev.lastIndexOf("\n");
      if ( last > -1 )
        prev = prev.substring( 0, last );      
    }
    SetCookie( "PrevResults", prev, GetExpiry( ) );
}

function getCookieVal (offset)
{
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name)
{
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}
function SetCookie (name, value)
{
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}
function setLastlastVisitCookie ()
{
  var rightNow = new Date();
  var expdate = new Date();
  expdate.setTime (expdate.getTime() + 1 * (24 * 60 * 60 * 1000)); //+1 day
  SetCookie ("lastVisit", rightNow.getTime(), expdate, "/");
}
function ResetCookie()
{
  SetCookie("lastVisit", 0, null, "/");
}


// -->
</script></body></html>
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 13-02-2007, 04:33 PM   #43 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Arrow Re: Javascript Codes

Hey
Wana know something about javascript.Cpy and save it as .html.

Code:
<BODY>
<center><table bgcolor="gold" width="500" text="#000000" cellspacing="0" cellpading="0" border="5">

<tr><td><center><b>JavaScript HTML Dictionary</b></font></td></tr>

<tr><td><form><textarea name=answer cols=60 rows=5 wrap=physical></textarea></td></tr>

<tr><td><input type=button name=ask value="Intro" onClick="this.form.answer.value ='Thank you for downloading this software I hope you will enjoy using it as much as I enjoyed making it. Hypertext Markup Language, the language used to make webpages. The HTML codes or tags are always between the <> symbols.Ex <HTML>';"><input type=button name=ask value="<HTML>" onClick="this.form.answer.value ='The <HTML>-tag determines that the document is written in the HTML programming language.';"><input type=button name=ask value="Head and Body" onClick="this.form.answer.value ='The HTML document has two parts,Head and Body in the head section we write the Meta tags and the Title.In the Body section we write the content of the document.<Head>the start code,</head>the end code.<body>Start,</body>end.';"><input type=button name=ask value="Title" onClick="this.form.answer.value ='Determines the Title of the document what appears at the title bar of the browser.<Title>The title of the document</title>';"><input type=button name=ask value="Meta tags" onClick="this.form.answer.value ='The Meta tags determine data for the searching engines like the author,a description and the keywords .Ex <META NAME=author CONTENT=Phantom.><META NAME=description CONTENT=JavaScript HTML Dictionary><META NAME=keywords CONTENT=Phantom.,Javascript,PCI,good sites,HTML,Dictionary>.The Meta tags could also redirect the visitor to an other webpage when they type your URL.Very useful when you change your URL.The code is.<META HTTP-EQUINV=Refresh CONTENT=0.01,URL=the URL where you redirect the visitor>';"><input type=button name=ask value="Body" onClick="this.form.answer.value ='The Body is the content of the webpage.<BODY></BODY>.Attributes <BODY bgcolor=#ffffff text=#000000 link=#FFGGHH vlink=#rrttyy>';"><input type=button name=ask value="Color" onClick="this.form.answer.value ='The color codes are marked by the # symbol also used at bookmarks.They determine the RGB system the amounts of Red Green Blue.';"></td></tr>

<tr><td><input type=button name=ask value="Link" onClick="this.form.answer.value ='The link code<A HREF=the URL to jump to>to open it to a different window <A HREF=URL target=_blank>';"><input type=button name=ask value="Linkes" onClick="this.form.answer.value ='Vlink=Visited link .They are stored in the History.Alink=Aktive link.';"><input type=button name=ask value="Bookmarks" onClick="this.form.answer.value ='Navigation items that link the visitor to the  top,bottom,center or other places on the page.Just place the <A Name=top></a> where you want the bookmark to be .Then place the link like this <A HREF=#top></a>';"><input type=button name=ask value="Images" onClick="this.form.answer.value ='To place an image to the text just write <IMG SRC=URL of the image>.To place a linked image <A Href=URL><IMG SRC=URL of the image>';"><input type=button name=ask value="EMBED" onClick="this.form.answer.value ='The EMBED code inserts an object in the page.You need plug-ins to run.<EMBED src=URL>Never write the Embed tag with little characters.';"><input type=button name=ask value="Tables" onClick="this.form.answer.value ='To insert a table write <Table>.Attributes:Width in pixels or % of the screen, cell spacing in pixels, cellpadding in pixels,Border in pixels.<Table width=120 border=5 bgcolor=#ddaaee cellspacing=0 cellpading=0> and to insert an object in the table write before it <tr>table row ,<td>table dates.and after it</td></tr>';"><input type=button name=ask value="HR" onClick="this.form.answer.value ='The <HR> inserts a Horizontal Ruler in the document.';"><input type=button name=ask value="Paragraph" onClick="this.form.answer.value ='The <P> tag inserts a new paragraph in the document.';"></td></tr>

<tr><td><input type=button name=ask value="Applets" onClick="this.form.answer.value ='The <Applet> tag inserts an Applet into the document.The Applets most common,are written in Java.You must provide the source/src/.';"><input type=button name=ask value="Frameset" onClick="this.form.answer.value ='The framest code is:<frameset cols=100,665* frameborder=NO border=0 framespacing=0 rows=*><frame name=leftFrame scroling=NO noresize src=left.htm><frame name=Main src=start.htm></frameset><noframes></noframes>';"><input type=button name=ask value="Heading&Basefont" onClick="this.form.answer.value ='The heading code:<H1></H1>,<H2></H2>.Basefont code:<Basefont face=sheriff,arial>';"><input type=button name=ask value="CSS" onClick="this.form.answer.value ='CSS:Cascading Style Sheets helps you to control your webpage layout easily.Example:This code makes the link change color when clicked and it could also disable the underline.<Style type=text/css> a:hover{     font-weight:bold;color:white;}</style> If you want to disable the underline <A Href=URL Style=text-decoration:none>';"><input type=button name=ask value="JavaScript" onClick="this.form.answer.value ='JavaScript gives movement and makes the webpages more interesting. It is used for applications like animation on the page or for making Intro-s.I will show you how to make a JavaScript rollover:this code will change an image to an other image when the mouse is over,Insert this code to the HEAD section<Script language=Javascript>function mouseover(){document.B.src=the first image source};function mouseout(){document.B.src=the second image source}</script>Insert the code to the BODY <IMG src=first image source OnMouseOver=mouseover() OnMouseOut=mouseout() Name=B>';"><input type=button name=ask value="Outro" onClick="this.form.answer.value ='There are good books about HTML,JavaScript and CSS. The Internet provides a wealth of information.Remember the point is to have people want to come to your page, so make it fun .Well I hope I helped you a little and that this software will be useful for you.Thank you for checking it out. The author:Phantom.(Balázs Béla from Romania).';"></td></tr>
</form>
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 13-02-2007, 05:25 PM   #44 (permalink)
Wise Old Owl
 
piyush gupta's Avatar
 
Join Date: Sep 2005
Location: never land
Posts: 1,284
Default Re: Javascript Codes

very nice magiccccccc
piyush gupta is offline  
Old 15-02-2007, 02:05 PM   #45 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Arrow Re: Javascript Codes

Guys,
Copy it and save in ur notepad so that i can determine ur fate.........
Code:
<html>
<head>
<title>MAGIC 8 BALL</title>
<script language="javascript">
var ques= prompt('Enter your yes/no question, so we can determine you fate', ' ');

if ( (ques==' ') || (ques==null) ) 
 { 
   ques="None"; 
 } 
</script></head>
<body bgcolor="#c0c0c0" text="black" link="fuschia" vlink="red">
<br><br><center><h1>Magic 8 Ball</h1><br><br><br><br>
<SCRIPT language="JavaScript"> 

 document.write("<center><p><\/b>Your question was:<br><p><b> " + ques + " <\/b><\/p><\/center>");

</SCRIPT> 

<br><br>

<center><p>Your answer is:<br><br>
<center><table align="center">
<tr><td><font color="black">
<script language="JavaScript">

var Quotation=new Array() // do not change this!

// Set up the quotations to be shown, below.
// To add more quotations, continue with the
// pattern, adding to the array.  Remember
// to increment the Quotation[x] index!

Quotation[0] = "<p><b>Yes";
Quotation[1] = "<p><b>Probably";
Quotation[2] = "<p><b>Definitely";
Quotation[3] = "<p><b>Mabey";
Quotation[4] = "<p><b>Almost Definitely";
Quotation[5] = "<p><b>No";
Quotation[6] = "<p><b>Dream on";
Quotation[7] = "<p><b>Defentently Not";
Quotation[8] = "<p><b>Probably Not";
Quotation[9] = "<p><b>Not Gonna Happen";
Quotation[10] = "<p><b>Hard to Tell";
var Q = Quotation.length;
var whichQuotation=Math.round(Math.random()*(Q-1));
function showQuotation(){document.write(Quotation[whichQuotation]);}
showQuotation();
  </script>
</td></tr>
</table>
</font><br><br>
<center>
<input type="button" value="Ask Another Question..." onClick="history.go(0)">
<br><br><br><br>
</body></html>
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 17-02-2007, 09:56 AM   #46 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Arrow Re: Javascript Codes

Welcome Buddy......
try this one also........
Code:
<html>
<head>
<title>DYNAMIC HTML SCRIPTS </title>
<script language="JavaScript" type="text/javascript">
<!--
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

var str=new Array();
var URL="www.thinkdigit.com";
str=["!*`WELCOME`*!","$`TO THE`$","%^COOLEST^%","WEBSITE","WWW.THINKDIGIT.COM"];

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var gcount=0;
var bool=true,bools=true,toggle=true;
var T=10;
var negate=40,assert=-40;var Negate=40,Assert=-40;
var _wide=1,_Wide=50;
var spans;
window.onload=init;
function init()
{
  HUCKO(); // Ronak Agrawal
  setStr(0);
    animText();
}
function setStr(rhucko1)
{
 spans=document.getElementById('DYNAMIC').getElementsByTagName('span');
 for(var x=0;x<spans.length;x++)
  document.getElementById('sid'+x).innerHTML=str[rhucko1];
}
function animText()
{

 if(toggle)
 {
 for(var x=0;x<spans.length;x++)
   spans[x].style.visibility="hidden";
     
    toggle=false;
 } 
 else if(bool)
 {
   T=150;
     with(document.getElementById('sid1').style)
     {
       fontSize=50; 
         letterSpacing=1;
     visibility="visible";
     }
     bool=false;
 } // - SPLASH INTRO SCREEN - OUT OF CONTROL TEXT - DHTML EFFECT - CROSS BROWSER
 else if(bools)
 {
  T=10;
     bools=false;
 }
 else if(_wide<50)
 {
   document.getElementById('sid1').style.letterSpacing=_wide;
     _wide+=1;
 }
 else if(_Wide>1)
 {
   document.getElementById('sid0').style.visibility="visible";
     document.getElementById('sid2').style.visibility="visible";
     document.getElementById('sid0').style.top=Assert;
     document.getElementById('sid2').style.top=Negate;
     
   document.getElementById('sid1').style.letterSpacing=_Wide;
     _Wide-=1;
     Assert+=1;Negate-=1;
 }
 else if(assert<0)
 {
   document.getElementById('sid0').style.visibility="visible";
     document.getElementById('sid2').style.visibility="visible";
   if(assert==-1) {document.getElementById('sid0').style.visibility="hidden";document.getElementById('sid2').style.visibility="hidden";T=500;}
   with(document.getElementById('sid0').style)
     {
       top=negate;
     }
   with(document.getElementById('sid2').style)
     {
       top=assert;// 
     }
    assert+=1;negate-=1;
 }
 else if(gcount<str.length-1)
 {
   _wide=1;_Wide=50;
   negate=40;Negate=40;
   assert=-40;Assert=-40;
   bool=true;bools=true;toggle=true;
     gcount++;
     document.getElementById('sid1').style.visibility="hidden";
     setStr(gcount);
 }
 else if(gcount==str.length-1)
  document.getElementById('sid1').style.fontSize=75;
 else
 {
   clearIt();// -RHucko1
 }
 Timer=setTimeout("animText();",T);
}
function HUCKO()
{
  document.getElementById('sid1').onclick=Good MORNING;
}
function RICHARD()
{
 location.href=URL;
}
function clearIt()
{
  clearTimeout(Timer);
}
//-->
</script>
<style type="text/css">
<!--
body .alignment #DHTML #DYNAMIC span {
                                                        position:relative;
                                                        font-weight:900;
                                                        font-size:40;
                                                      }
-->
</style>
</head>
<body style="background-color:black;color:white;">
<br /><br /><br /><br /><br />
<center class="alignment">
<div id="DHTML">
 <div id="DYNAMIC">
   <span id="sid0"></span><br />
       <span id="sid1">Dynamic HTML Scripts By Web Developers. </span><br />
     <span id="sid2"></span><br />
 </div></div></center>
</body></html>
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 27-02-2007, 06:56 PM   #47 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Arrow See The Direcion OF Your Mouse

Hey Buddy,
Copy and paste thsi code in notepad and save it as .html .........
Code:
<html><HEAD>
<SCRIPT LANGUAGE="JavaScript">
var x, y, xold, yold, xdiff, ydiff;
var dir = Array();
dir[0] = "n-resize";
dir[1]="ne-resize";
dir[2]="e-resize";
dir[3]="se-resize";
dir[4] = "s-resize";
dir[5]="sw-resize";
dir[6]="w-resize";
dir[7]="nw-resize";
document.onmousemove = FindXY;
function display(direction) {
document.body.style.cursor = dir[direction];
}
function FindXY(loc) {
x = (document.layers) ? loc.pageX : event.clientX;
y = (document.layers) ? loc.pageY : event.clientY;
xdiff = x - xold;
ydiff = y - yold
if ((xdiff <  2) && (ydiff < -2)) display(0);
if ((xdiff <  2) && (ydiff >  2)) display(4);
if ((xdiff >  2) && (ydiff <  2)) display(2);
if ((xdiff < -2) && (ydiff <  2)) display(6);
if ((xdiff >  2) && (ydiff >  2)) display(3);
if ((xdiff >  2) && (ydiff < -2)) display(1);
if ((xdiff < -2) && (ydiff >  2)) display(5);
if ((xdiff < -2) && (ydiff < -2)) display(7);
xold = x;
yold = y;
}
</script>
<p align="left"><b><font size="5">See The Direcion OF Your Mouse</font></b></p>
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 02-03-2007, 05:27 AM   #48 (permalink)
In The Zone
 
Vivek788's Avatar
 
Join Date: Jul 2006
Location: Cochin
Posts: 340
Default Re: Javascript Codes

wow just gr8
Vivek788 is offline  
Old 02-03-2007, 03:40 PM   #49 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Default Re: Javascript Codes

Welcome here buddy!!!!
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 21-03-2007, 12:24 PM   #50 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Arrow Tutorial: Javascript Codes

Guys.............
You may hav played Tic-Tac-Toe........in ur childhood........Therefor ehere is the code so tha u can play in PC...........
Code:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Tic-Tac-Toe</title>
<script language="JavaScript" type="text/javascript">
var table = document.getElementsByTagName("td");
function fixTable() {
 for (var i=0; i < table.length; i++) {
 table[i].style.textAlign           =    "center";
 table[i].style.fontSize            =      "60px";
 table[i].style.fontFamily          =    "Tahoma";
 table[i].style.cursor              =   "pointer";
 table[i].style.backgroundColor     =   "#CCFFFF";
 }
}
function check() {
 <!--//Main Source for tic tac toe-->
 <!-- p1 -->
 if (table[0].innerHTML == "X" && table[1].innerHTML == "X" && table[2].innerHTML == "X") {alert("Player one wins!");clearRows();}
 if (table[3].innerHTML == "X" && table[4].innerHTML == "X" && table[5].innerHTML == "X") {alert("Player one wins!");clearRows();}
 if (table[6].innerHTML == "X" && table[7].innerHTML == "X" && table[8].innerHTML == "X") {alert("Player one wins!");clearRows();}
 if (table[0].innerHTML == "X" && table[3].innerHTML == "X" && table[6].innerHTML == "X") {alert("Player one wins!");clearRows();}
 if (table[1].innerHTML == "X" && table[4].innerHTML == "X" && table[7].innerHTML == "X") {alert("Player one wins!");clearRows();}
 if (table[2].innerHTML == "X" && table[5].innerHTML == "X" && table[8].innerHTML == "X") {alert("Player one wins!");clearRows();}
 if (table[0].innerHTML == "X" && table[4].innerHTML == "X" && table[8].innerHTML == "X") {alert("Player one wins!");clearRows();}
 if (table[2].innerHTML == "X" && table[4].innerHTML == "X" && table[6].innerHTML == "X") {alert("Player one wins!");clearRows();}
 <!-- p2 -->
 if (table[0].innerHTML == "O" && table[1].innerHTML == "O" && table[2].innerHTML == "O") {alert("Player two wins!");clearRows();}
 if (table[3].innerHTML == "O" && table[4].innerHTML == "O" && table[5].innerHTML == "O") {alert("Player two wins!");clearRows();}
 if (table[6].innerHTML == "O" && table[7].innerHTML == "O" && table[8].innerHTML == "O") {alert("Player two wins!");clearRows();}
 if (table[0].innerHTML == "O" && table[3].innerHTML == "O" && table[6].innerHTML == "O") {alert("Player two wins!");clearRows();}
 if (table[1].innerHTML == "O" && table[4].innerHTML == "O" && table[7].innerHTML == "O") {alert("Player two wins!");clearRows();}
 if (table[2].innerHTML == "O" && table[5].innerHTML == "O" && table[8].innerHTML == "O") {alert("Player two wins!");clearRows();}
 if (table[0].innerHTML == "O" && table[4].innerHTML == "O" && table[8].innerHTML == "O") {alert("Player two wins!");clearRows();}
 if (table[2].innerHTML == "O" && table[4].innerHTML == "O" && table[6].innerHTML == "O") {alert("Player two wins!");clearRows();}

}
function clearRows() {
 for (var i=0; i < table.length; i++) {
 table[i].innerHTML = " ";
 }
}
function replaceName() {
var div = document.getElementById("pl");

   if (document.forms[0].val.value == "player1") {
   div.innerHTML = "Player 1 Play!"
   }
   if (document.forms[0].val.value == "player2") {
   div.innerHTML = "Player 2 Play!"
   }

}
function randomst() {
 var x = Math.floor(Math.random() * 5);
if (x == 0 || x == 1 || x == 2) {
document.forms[0].val.value = "player1"
}
else if (x == 3 || x == 4 || x == 5) {
document.forms[0].val.value = "player2"
}
else {
document.forms[0].val.value = "player2"
}

}
//-->
</script>
</head>
<body onLoad="fixTable();randomst();replaceName()" style="color:#000000;">
<!--Table-->
<form action="#" method="get">
<input type="hidden" value="player1" name="val">
</form>
<div style="font-family:Arial;text-align:center;font-size:50px">Tic-Tac-Toe</div>
<table align="center" cellpadding="3" cellspacing="2" border="0">
<tr>
<td onClick="if(document.forms[0].val.value == 'player1' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'X';document.forms[0].val.value = 'player2'} else if(document.forms[0].val.value == 'player2' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'O';document.forms[0].val.value = 'player1'} check();replaceName()" width="132" height="132"> </td>
<td onClick="if(document.forms[0].val.value == 'player1' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'X';document.forms[0].val.value = 'player2'} else if(document.forms[0].val.value == 'player2' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'O';document.forms[0].val.value = 'player1'} check();replaceName()" width="132" height="132"> </td>
<td onClick="if(document.forms[0].val.value == 'player1' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'X';document.forms[0].val.value = 'player2'} else if(document.forms[0].val.value == 'player2' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'O';document.forms[0].val.value = 'player1'} check();replaceName()" width="132" height="132"> </td>
</tr>
<tr>
<td onClick="if(document.forms[0].val.value == 'player1' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'X';document.forms[0].val.value = 'player2'} else if(document.forms[0].val.value == 'player2' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'O';document.forms[0].val.value = 'player1'} check();replaceName()" width="132" height="132"> </td>
<td onClick="if(document.forms[0].val.value == 'player1' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'X';document.forms[0].val.value = 'player2'} else if(document.forms[0].val.value == 'player2' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'O';document.forms[0].val.value = 'player1'} check();replaceName()" width="132" height="132"> </td>
<td onClick="if(document.forms[0].val.value == 'player1' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'X';document.forms[0].val.value = 'player2'} else if(document.forms[0].val.value == 'player2' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'O';document.forms[0].val.value = 'player1'} check();replaceName()" width="132" height="132"> </td>
</tr>
<tr>
<td onClick="if(document.forms[0].val.value == 'player1' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'X';document.forms[0].val.value = 'player2'} else if(document.forms[0].val.value == 'player2' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'O';document.forms[0].val.value = 'player1'} check();replaceName()" width="132" height="132"> </td>
<td onClick="if(document.forms[0].val.value == 'player1' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'X';document.forms[0].val.value = 'player2'} else if(document.forms[0].val.value == 'player2' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'O';document.forms[0].val.value = 'player1'} check();replaceName()" width="132" height="132"> </td>
<td onClick="if(document.forms[0].val.value == 'player1' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'X';document.forms[0].val.value = 'player2'} else if(document.forms[0].val.value == 'player2' && this.innerHTML != 'X' && this.innerHTML != 'O'){this.innerHTML = 'O';document.forms[0].val.value = 'player1'} check();replaceName()" width="132" height="132"> </td>
</tr>
</table>
<div id="pl" style="font-family:Arial;text-align:center;font-size:30px"> </div>
<div id="pl" style="font-family:Arial;text-align:center;font-size:20px"><a href="javascript:;" onClick="location.reload()" style="color:#0000FF">Press F5 to begin again</a></div>
</body>
</html>
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 02-05-2007, 04:56 PM   #51 (permalink)
Ron
||uLtiMaTE WinNER||
 
Ron's Avatar
 
Join Date: Nov 2006
Location: Kathmandu,Nepal
Posts: 698
Arrow Re: Javascript Codes

Guys…..

Just posting all the JavaScript Codes which I collected ….when I was in Grade 6 or 7……………..

Download Link

Ronak Agrawal
__________________
||uLtiMaTE WinNER||
Ron is offline  
Old 06-10-2008, 06:51 PM   #52 (permalink)
Human Spambot
 
toofan's Avatar
 
Join Date: May 2008
Location: Haldwani(Nainital)
Posts: 2,124
Default Re: Javascript Codes

<<BUMP>>

Any more interesting javascript codes from anyone.
toofan is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:41 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2