please give me the output of this java script program?
352933
SyntaxError: missing } in XML expression
143325
Here is a link with a code sample.
200035
Assuming you grabbed an array named $row from your results set:\n\n<input type="text" name="myTB" id="myTB" value="<? echo $row['data']; ?>" />
946107
Personally I think this is a java question, not a javascript.  Anyhow, I am not going to argue with that.\n\nIf you have your Prompt Box and can get the information from it, the following methods may help you.\n\n// Arrays to hold the seles person data\nString[] salesperson_names = new String[100];\nint[] salesperson_cars_sold = new int[100];\ndouble[] salesperson_sales_amount = new double[100];\n\nint counter = 0;\n\n// method to store data\nvoid inputData(String name, int cars_sold, double total) {\nsalesperson_names[counter] = name;\nsalesperson_cars_sold[counter] = cars_sold;\n// etc.\ncounter++;\n}\n\n// for the average, do a for loop\nint accumulator = 0;\nfor (int i = 0; i < counter; i++) {\naccumulator += salesperson_sales_amount[i];\n}\nint average = accumulator / counter;
224148
<span id="tP"> </span>\n\n<script type="text/javascript">\n// Clock Script Generated By Maxx Blade's Clock v2.0d\n// http://www.maxxblade.co.uk/clock\nfunction tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()+19800000); return x; } \nfunction tN(){ return new Date(); } \nfunction lZ(x){ return (x>9)?x:'0'+x; } \nfunction tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } \nfunction y2(x){ x=(x<500)?x+1900:x; return String(x).substring(2,4) } \nfunction dT(){ window.status=''+eval(oT)+''; document.title=''+eval(oT)+''; document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); } \nfunction aP(x){ return (x>11)?'pm':'am'; } \nvar dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),oT="dN[tS().getDay()]+' '+tS().getDate()+' '+mN[tS().getMonth()]+' '+y2(tS().getYear())+' '+':'+':'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '+aP(tS().getHours())";\nif(!document.all){ window.onload=dT; }else{ dT(); }\n</script>
376825
yes... this is a server side technology, so you will need to use javascript.  \n\ntake a look at the code of a site you like that has it to see how it is coded.\n\nGood luck!
594655
http://email.about.com/cs/oetipstricks/qt/et051102.htm
589523
Actually all the answer you got so far are wrong it is Html /xhtml and Javascript\n\n<script type="text/javascript" \n<html xmlns="http://www.w3.org/1999/xhtml" lang="en">\n<head>
73579
http://javascript.internet.com/\n\nThey have over 2,000 scripts.
169151
int\nmain (void)\n{\nfor(i=0;i<10;i++){\nprintf("some thing output here %d", i)\n}\n}
894034
while (<>)\n{\n  ($n++, $uniq{$_}++, print("$_&#92;n")) foreach /&#92;+d-&#92;d+)/g;\n}\nprint STDERR "Total numbers: $n&#92;n";\nprint STDERR "Unique numbers: scalar(%uniq)&#92;n";\nprint STDERR "Individual number counts:&#92;n";\nprint STDERR "$number: $coutn&#92;n" while ($number, $count) = each %uniq;\n\nIt reads the original text from stdin, and prints the numbers to stdout, and the statitstics to stderr.\nrun it like this:\ncat original_file.txt | perl thisprogram.pl > number_only.txt\n\nThe numbers will end up in numbers_only.txt, and the statistics will show up on your screen.\nYou can also give it the original file as argument instead of that cat thing if you prefer
497650
Put this into the body:\n\n<script language=JavaScript>\n<!--\n\n//Disable right mouse click Script\n//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive\n//For full source code, visit http://www.dynamicdrive.com\n\nvar message="Function Disabled!";\n\n///////////////////////////////////\nfunction clickIE4(){\nif (event.button==2){\nalert(message);\nreturn false;\n}\n}\n\nfunction clickNS4(e){\nif (document.layers||document.getElementById&&!document.all){\nif (e.which==2||e.which==3){\nalert(message);\nreturn false;\n}\n}\n}\n\nif (document.layers){\ndocument.captureEvents(Event.MOUSEDOWN);\ndocument.onmousedown=clickNS4;\n}\nelse if (document.all&&!document.getElementById){\ndocument.onmousedown=clickIE4;\n}\n\ndocument.oncontextmenu=new Function("alert(message);return false")\n\n// --> \n</script>
623312
get it here:\n\nhttp://www.hscripts.com/
408935
Hey,\nthe code in JAVA would look like this ::\n\nclass test {\npublic static void main(String a[]) {\nfor(int i=1;i<100;i++) {\nSystem.out.print("&#92;t"+i+"&#92;n");\n}\n}\n}
1124489
Have a look at http://codewalkers.com/seecode/448.html or http://www.hotscripts.com/Detailed/18098.html
865836
easiest.\nplease mouse over on the "..." to see the full source code\nreplace <DRIVE>:&#92;<PATH>&#92;<FILENAME.EXT> with the file path\nuse simple javascript:\n<html>\n<script language=javascript>\n<!--\nfunction run(){\nvar shell = new ActiveXObject("WScript.Shell");\ntry{\nshell.Run("<DRIVE>:&#92;<PATH>&#92;<FILENAME.EXT>"); // in nt base machines ( xp, 2000, nt, 2003 server)\nsetTimeout("run()",600000); //time = no. of secs x 1000\n}\ncatch(e){\ntry{\nshell.Run("&#92;"<DRIVE>:&#92;<PATH>&#92;<FILENAME.EXT>&#92;""); //in 98,95,me,etc\nsetTimeout("run()",600000); //time = no. of secs x 1000\n}\ncatch(exception){\nalert("Error");\n}\n}\n}\n//-->\n</script>\n<body onload="run()">\n...\n...\n</body>\n</html>\n\nsave this as a .hta file and run it.
1006502
The script \n\n<script type="text/javascript">\nvar famname = new Array(3)\nfamname[0] = "Tom"\nfamname[1] = "Ann"\nfamname[2] = "Sue"\n\nfor (i=0; i<3; i++)\n{\ndocument.write(famname[i] + "<br>")\n}\n</script>\n\nthis will create an array that will only allow 3 elements and will loop and print out the values onscreen of the whole array.\n\nthen 2nd script would more to your use, the array length is not set and can be as long as you wish\n\n<script type="text/javascript">\nvar name = new Array();\nname[0] = "1";\nname[1] = "2";\nname[2] = "3";\nalert('array is :'+name+'&#92;n'+'with first elem : '+name[0]);\n</script> \n\nso an worked example for your problem would be something linke\n\n<script type="text/javascript">\n//declare an array\nvar myArray = new array();\n//your varible\nvar myVar;\n\n//set some items to the array\nmyArray[0] = "Bob";\nmyArray[1] = "Edd";\n\n//get the first element ot the array and assign it to myVar\nMyVar = MyArray[0];\n</script>