Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by PatG

  1. PatG

    which radio is checked?

    y2k1981, Here is how I do it: var response=0; for (var i=1; i <= form1.selection.length; i++) { if (form1.selection[i-1].checked) { var response = i; break; } } If response == 0, then nothing was selected; otherwise, response holds the sequential number (not index) of the...
  2. PatG

    multi-dimensional arrays

    Following Horrid:<br> Javascript's matJ = new Array(new Array(), new Array()) acts similar to VB's dim matV(2,dim2) but is more flexible in that the Javascript's matJ &quot;rows&quot; need not have the same length. Get the entry in the second row, third column of matJ by var x = matJ[1][2]...
  3. PatG

    How do you create a random integer in range...

    Math.random() generates a pseudorandom number between 0 and 1. The code below stretches the interval (0,1) to (0,maximum-minimum), then adds minimum to get the new interval (minimum, maximum), then uses Math.floor to get an integer in the interval. Use whatever you like for minimum and...

Part and Inventory Search

Back
Top