Difference between revisions of "NationStates:Login"
From NSWiki
m (data-src) |
m |
||
Line 1: | Line 1: | ||
− | <shtml version="2" keyname="afforess" hash=" | + | <shtml version="2" keyname="afforess" hash="3b9290fb645a41bae54ce39eb310d182b10b0e2f5f9074354f59e58c2ae95e29"><input id='nation_name' placeholder='Nation Name' type='text' style='width:350px;height:24px;'></input><button class='btn' style='margin-left:5px;margin-top: -3px;' id='nation_enter'>Locate Nation</button> |
<p id='login_error' style='color:red; font-weight:bold; display:none;'>An Error Occured</p> | <p id='login_error' style='color:red; font-weight:bold; display:none;'>An Error Occured</p> | ||
Line 14: | Line 14: | ||
$("#nation_enter").attr("disabled", true); | $("#nation_enter").attr("disabled", true); | ||
$.get("/nsapi/nation/title/?name=" + encodeURIComponent($("#nation_name").val()), function(data) { | $.get("/nsapi/nation/title/?name=" + encodeURIComponent($("#nation_name").val()), function(data) { | ||
− | + | console.log("found nation named " + $("#nation_name").val()); | |
− | + | $("#nation_enter").removeAttr("disabled").hide(); | |
− | + | $("#nation_name").hide() | |
− | + | $("#advanced").show(); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
}).fail(function() { | }).fail(function() { | ||
$("#login_error").html("No Nationstates Nation named " + + $("#nation_name").val() + ".").show(); | $("#login_error").html("No Nationstates Nation named " + + $("#nation_name").val() + ".").show(); |
Revision as of 20:24, 22 January 2014