Accessing the System Clipboard with JavaScript – A Holy Grail?

I am developing an API written in JavaScript for a project which requires the ability to copy data to, and retrieve data from, a clipboard within a web browser. A simple/common problem definition – but due to tight browser security, finding a solution is a bit of a nightmare. This article outlines and discusses a number of approaches for implementing a clipboard feature into your JavaScript applications.

copy-paste
Continue reading

Advertisements

“goto” equivalent in Java (kind-of)

I didn’t think that Java supported GOTO… but I revisted some documentation on control logic for java and found that you can use break label to jump backward … unfortunatly you can’t jump forward … so yea, java doesn’t support GOTO :(, but it partially does, heres an example from the Sun docs:

search:
for (i = 0; i < arrayOfInts.length; i++) {
  for (j = 0; j < arrayOfInts[i].length; j++) {
    if (arrayOfInts[i][j] == searchfor) {
      foundIt = true;
      break search;
    }
  }
}

I remember looking for a goto tag and it seemed I overlooked a post in this forum.