Skip to content

Instantly share code, notes, and snippets.

@mhulse
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhulse/8922112 to your computer and use it in GitHub Desktop.
Save mhulse/8922112 to your computer and use it in GitHub Desktop.
Caché Server Pages Hyperevents Example.
<script language="cache" method="MakeList2" arguments="myFlag:%String">
&js<console.log("i see #(myFlag)#");>
</script>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<p>Open your browser's console window, click this <button type="button">button</button> and pump fists in delight.</p>
<script src="//code.jquery.com/jquery-2.1.0.min.js"></script>
<script>
$(document).ready(function() {
$('button').click(function($e) {
$e.preventDefault(); // Probably not needed as the button is not in a form.
#server(..MakeList2("Kirk"))#;
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment