Created
January 13, 2011 15:17
-
-
Save geeknam/778022 to your computer and use it in GitHub Desktop.
Chrome Extension to get RP pics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function showPic(){ | |
$("#studentImage").hide().html(getPic()).fadeIn(2000); | |
$("#studentId").val(""); | |
$("#fullname").val(""); | |
} | |
function getPic(){ | |
var idval = $("#studentId").val(); | |
var nameval = $("#fullname").val(); | |
url = '<img src="Directory of the schools site that pictures resides at' + idval + '-' + nameval + '.jpg" onerror="notFound()"/>'; | |
return url; | |
} | |
function notFound(){ | |
errorMsg = '<span class="error">Image not found. Invalid student ID or student name.</span>'; | |
$("#studentImage").html(errorMsg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment