Difference between revisions of "Template:Find an article"

From NSWiki
Jump to: navigation, search
(Created page with "<shtml version="2" keyname="jenlom" hash="c8e741288d48682e853723213f42032acb7d5dfa8b372a411e11d61aa9e4119e"><script> function showDiv() { if ($('#article:hidden').length >...")
 
Line 1: Line 1:
<shtml version="2" keyname="jenlom" hash="c8e741288d48682e853723213f42032acb7d5dfa8b372a411e11d61aa9e4119e"><script>
+
<shtml version="2" keyname="jenlom" hash="74390a3cdd41240bba267689ed36e708d3aa7c4c864f073f3d93550d926320e8"><script>
function showDiv() {
+
function showDivArticle() {
 
     if ($('#article:hidden').length > 0) {
 
     if ($('#article:hidden').length > 0) {
 
         $('#article').slideDown('medium');  
 
         $('#article').slideDown('medium');  
Line 6: Line 6:
 
         $('#articleinput').select();
 
         $('#articleinput').select();
 
   } else {
 
   } else {
         search();
+
         searchArticle();
 
     }
 
     }
 
}
 
}
function press(e) {
+
function pressArticle(e) {
 
     var evt = e || window.event
 
     var evt = e || window.event
 
     if (evt.keyCode === 13) {
 
     if (evt.keyCode === 13) {
         search();
+
         searchArticle();
 
     }
 
     }
 
}
 
}
function search() {
+
function searchArticle() {
 
     window.location.href = "http://nswiki.org/index.php?search=" + $("#articleinput").val();
 
     window.location.href = "http://nswiki.org/index.php?search=" + $("#articleinput").val();
 
}
 
}
 
</script>
 
</script>
 
<div style="border-width: 0px; border-style: solid; border-radius: 3px; background-color:#white; box-shadow: 0px 4px 10px #999999; align:center; width:80%; text-align: center; padding: 3ex 3ex; margin-top: 1em; margin-bottom: 1em; margin-left: 1em; margin-right: 1em;"><div id="welcomeDiv"  style="display:none;" class="answer_list" > WELCOME</div>
 
<div style="border-width: 0px; border-style: solid; border-radius: 3px; background-color:#white; box-shadow: 0px 4px 10px #999999; align:center; width:80%; text-align: center; padding: 3ex 3ex; margin-top: 1em; margin-bottom: 1em; margin-left: 1em; margin-right: 1em;"><div id="welcomeDiv"  style="display:none;" class="answer_list" > WELCOME</div>
<input type="button" name="article" value="Find an article" onclick="showDiv()" /><div id="article" style="display: none;"><input type="text" id= "articleinput" placeholder="article" style="border:0px solid; box-shadow: 0px 2px 10px #999999; margin-top: 10px; text-align: center; padding: 5px 5px;" onkeydown="return press( event );"></input></div></div></shtml>
+
<input type="button" name="article" value="Find an article" onclick="showDivArticle()" /><div id="article" style="display: none;"><input type="text" id= "articleinput" placeholder="article" style="border:0px solid; box-shadow: 0px 2px 10px #999999; margin-top: 10px; text-align: center; padding: 5px 5px;" onkeydown="return pressArticle( event );"></input></div></div></shtml>

Revision as of 18:35, 22 January 2014