# Search:

Type: Posts; User: wbport

Page 1 of 17 1

1. ## Thread: Shuffle array, but not in place

by wbport
Replies
6
Views
911

### This is one idea: function calculate() { ...

This is one idea:

function calculate() {
var n = document.tournform.NoPlayers.value;
var deck = new Array();
var shuffle = new Array();
var OutText = "";

// Check that the...

by wbport
Replies
4
Views
621

### Something like (have not tested this) do { ...

Something like (have not tested this)

do {
var x=prompt("Enter option 1, 2, or 3","") }
until ((!isNaN(x) && (x > 0) && (x < 4));

Use of prompt() is on the decline, but it is a good place...

by wbport
Replies
4
Views
621

### One idea is a "do .... until" loop with the...

One idea is a "do .... until" loop with the first condition being (!isNaN) of the prompted variable, perhaps anded with other conditions to be sure the option is within your range.

Jednym z...
4. ## Thread: 15 Puzzle - Issues Issues Issues

by wbport
Replies
8
Views
1,745

### jQuery To create a list of consecutive numbers in random...

To create a list of consecutive numbers in random order, use a second array, example deck.

for (i=0; i < 15; i++) deck[i]=i+1
Your next for statement should probably be from the top down. To get...
5. ## Thread: Javascript math with variables

by wbport
Replies
10
Views
3,468

### You take the square root of "b-squared minus 4ac"...

You take the square root of "b-squared minus 4ac" and isn't it, you have 4AC minus 1 plus b-squared. Try "BA -4*A*C" or "(4*A*C*-1+BA)" instead.

by wbport
Replies
4
Views
517

### Do you mean arctangent instead of cotangent? It...

Do you mean arctangent instead of cotangent? It looks like you already have the ratio of the sides and want the angle.

Math.atan2(x,y) * 180 / pi

or just Math.atan(r) if you already have...
7. ## Thread: DevX Tip Bank

by wbport
Replies
0
Views
374

### DevX Tip Bank

Where do posts for a JavaScript suggestion go in the DevX Tip Bank?
8. ## Thread: Hide web element/content when focus is changed by clicking on open space of page

by wbport
Replies
5
Views
752

### Check for onblur perhaps?

Check for onblur perhaps?
9. ## Thread: JavaScript keeping window open . and browser IE icon blinking

by wbport
Replies
1
Views
1,073

### I only have a few pages that open another window...

I only have a few pages that open another window (albeit for display only), but I don't have a problem with the window not staying open until the user closes it. These are the last few lines in the...
10. ## Thread: special condition of selecting between divs

by wbport
Replies
22
Views
4,557

### I deleted my first post since it seemed too much...

I deleted my first post since it seemed too much ego trip and too little addressing your question. My web site is home.comcast.net, but look quickly since comcast will pull the plug on hobby (client...
11. ## Thread: special condition of selecting between divs

by wbport
Replies
22
Views
4,557

### If you are looking for a toggle button try: ...

If you are looking for a toggle button try:

<!DOCTYPE html>
<title>Toggle Demo</title>
<script language="JavaScript">
</html>var sw1
function startup() {
...
12. ## Thread: special condition of selecting between divs

by wbport
Replies
22
Views
4,557

### Deleted by author.

Deleted by author.

by wbport
Replies
8
Views
1,628

14. ## Thread: Understanding Date in javascript

by wbport
Replies
9
Views
2,134

### number of milliseconds before or since Jan 1,...

number of milliseconds before or since Jan 1, 1970 0:00 GMT
15. ## Thread: Understanding Date in javascript

by wbport
Replies
9
Views
2,134

### They are integers. See the first sentence of my...

They are integers. See the first sentence of my last post.
16. ## Thread: Understanding Date in javascript

by wbport
Replies
9
Views
2,134

### Time is processed with the number of milliseconds...

Time is processed with the number of milliseconds before or since Jan 1, 1970 0:00 GMT. There are a number of related functions to read or modify month, day, year, day of week, day of year, or hour,...
17. ## Thread: Understanding Date in javascript

by wbport
Replies
9
Views
2,134

### That's the number of milliseconds between those...

That's the number of milliseconds between those two dates.

by wbport
Replies
1
Views
1,210

### I found the arrow keys weren't any narrower than...

I found the arrow keys weren't any narrower than other keys. <g>
You need to have a keyHit event set up to handle the reading and acting on the narrow keys. This is one example: trivia.html and, up...
19. ## Thread: Need simple explanation

by wbport
Replies
12
Views
1,700

### There are three parts to a for loop: 1)...

There are three parts to a for loop: 1) Initializing. This is done once at the beginning of the loop. Here the variable I is defined and given a value of zero. 2) Condition that must be true for...
20. ## Thread: [RESOLVED] html vs hta

by wbport
Replies
4
Views
1,112

### I got it to work (am not sure why) by saving the...

I got it to work (am not sure why) by saving the month of first payment to a global variable both at startup (onload) and in the "ExtraDays" function. The ExtraDays function is kicked off onblur...
21. ## Thread: [RESOLVED] html vs hta

by wbport
Replies
4
Views
1,112

### I found a few references to it. Basically it...

I found a few references to it. Basically it runs html on your computer without much of the overhead of a browser when it ends in .hta https://en.wikipedia.org/wiki/HTML_Application is one, here is...
22. ## Thread: [RESOLVED] html vs hta

by wbport
Replies
4
Views
1,112

### [RESOLVED] html vs hta

This is a link to a loan calculator and, once it has been computed, another window for a principal-interest chart can be selected. It works fine as it is, there will be an alert for the month of...
23. ## Thread: Elapsed time counter

by wbport
Replies
2
Views
427

### Without doing your coding, this is what needs to...

Without doing your coding, this is what needs to happen: 1) Set the first date object to your July date and time. 2) A second date object is the current date/time. 3) Divide the difference between...

by wbport
Replies
1
Views
348

### Other Not to the computer. Someone looking at that...

Not to the computer. Someone looking at that code would get the clue "Ah Ha! There are 26 letters in the alphabet--I wonder if this code has something to do with it?" Just saying 123 makes it a...
25. ## Thread: how to make a text copy

by wbport
Replies
2
Views
674

### You can have a textarea selected in JavaScript,...

You can have a textarea selected in JavaScript, but the user would have to Cntl/C or Cntl/X as the first step in moving or copying it to another App (Alt/Tab). A simple example: ttr.htm .

If you...
Results 1 to 25 of 418
Page 1 of 17 1