Expecting Statement but saw block

... on (release) { if (clickTAG.substr(0,5) == "http:") { getURL(clickTAG); } } ...

Problem at line 10 character 13: Missing semicolon.
on (release) {
Problem at line 10 character 14: Expected to see a statement and instead saw a block.
on (release) {

Ich hoffe jemand weiss was da falsch ist.
Danke schonmal im Vorraus.

fehlt vor dem on nicht ein function?

function on(release) {
  alert("do something")
}