timblack1
unread,Apr 24, 2012, 2:41:42 AM4/24/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CouchApp
How can I get the codeAddress function below to run? I think the
problem is I'm not using the right syntax for the selectors. All of
the code below is in my "evently" toplevel directory/object. Thanks
in advance!
Tim
{
"search": {
"codeAddress": "function(e) {\n\t// TODO: For some reason this
doesn't run when I click the #search button\n\tconsole.log('running
codeAddress');}",
"_init": {
"mustache": "<div>\n\t<form action=\"TODO: write this!\">\n
\t\t<span class=\"watermark_container\"\n\t\t\tstyle=\"display: inline-
block; position: relative;\"><span\n\t\t\tclass=\"watermark\"\n\t\t
\tstyle=\"position: absolute; font-family: Verdana, Arial, sans-serif;
font-size: 18px; color: rgb(153, 153, 153); left: 6px; top: 2px;
height: 28px; line-height: 28px; text-align: left; pointer-events:
none;\">Enter\n\t\t\t\tlocation</span><input class=\"jq_watermark\"
title=\"Enter location\"\n\t\t\ttype=\"text\" name=\"location\" id=
\"search_the_map\"></span> Search\n\t\twithin <select title=\"Search
within\" name=\"radius\" id=\"radius\">\n\t\t\t<option value=\"5\">5</
option>\n\t\t\t<option value=\"10\">10</option>\n\t\t\t<option value=
\"25\">25</option>\n\t\t\t<option value=\"50\">50</option>\n\t\t
\t<option value=\"100\">100</option>\n\t\t\t<option value=\"250\">250</
option>\n\t\t</select> <select title=\"unit of measurement\" name=
\"units\" id=\"units\">\n\t\t\t<option value=\"miles\">miles</option>\n
\t\t\t<option value=\"km\">km</option>\n\t\t</select> <input type=
\"button\" value=\"Search\" id=\"search\">\n\t</form>\n\t<form action=
\"TODO\">\n\t\t<span class=\"watermark_container\"\n\t\t\tstyle=
\"display: inline-block; position: relative;\"><span\n\t\t\tclass=
\"watermark\"\n\t\t\tstyle=\"position: absolute; font-family: Verdana,
Arial, sans-serif; font-size: 18px; color: rgb(153, 153, 153); left:
6px; top: 2px; height: 28px; line-height: 28px; text-align: left;
pointer-events: none;\">Enter\n\t\t\t\tkeyword</span><input class=
\"jq_watermark\" title=\"Enter keyword\" type=\"text\"\n\t\t\tname=
\"keyword\" id=\"keyword\"></span>\n\t</form>\n</div>\n<div>\n\t<form
action=\"TODO\">\n\t\t<span class=\"watermark_container\"\n\t\t\tstyle=
\"display: inline-block; position: relative;\"><span\n\t\t\tclass=
\"watermark\"\n\t\t\tstyle=\"position: absolute; font-family: Verdana,
Arial, sans-serif; font-size: 18px; color: rgb(153, 153, 153); left:
6px; top: 2px; height: 28px; line-height: 28px; text-align: left;
pointer-events: none;\">Enter\n\t\t\t\tstate</span><input class=
\"jq_watermark\" title=\"Enter state\" type=\"text\"\n\t\t\tname=
\"state\" id=\"state\"></span>\n\t</form>\n</div>\n<div id=
\"group_filter\">\n\tFilter: <span> <a href=\"TODO\">OPC</a>\n\t</
span><span> <a href=\"TODO\">PCA</a>\n\t</span>\n</div>"
},
"selectors": {
"#search": {
"click": "codeAddress"
}
}
}
}