Skip to content

Instantly share code, notes, and snippets.

@indolering
Created May 22, 2012 18:33
Show Gist options
  • Select an option

  • Save indolering/2770807 to your computer and use it in GitHub Desktop.

Select an option

Save indolering/2770807 to your computer and use it in GitHub Desktop.
meemo test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>textInput</title>
<meta name="author" content="indolering" />
<meta name="description" content="simple text input box" />
<script type="text/javascript" src="http://meemoo.org/meemoo/v1/meemoo-min.js"></script>
<style type="text/css">
html, body {
margin:0;
padding:0;
font-family: Verdana;
font-size: 10px;
}
</style>
</head>
<body>
<form onsubmit="Meemoo.inputs.send(); return false;">
<input type="text" id="textInput">
<input type="submit" value="send">
</form>
<div>
Hello World!
</div>
<script type="text/javascript">
var text = "hello world";
var textInput = document.getElementById('textInput');
sendText = function(e) {
Meemoo.inputs.send();
};
Meemoo.setInfo({
title: "textInput",
author: "indolering",
description: "Simple text input box"
}).addInputs({
send: {
action: function () {
text = textInput.value;
Meemoo.send("text", text);
},
type: "bang"
}
}).addOutputs({
text: {
type: "string"
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment