Hi Marc,
I put 2 alerts on my code. The first alert displays BLANK value but the second one does displays the email address of the current user. Also, using jquery-2.0.3.js and jquery.SPServices-2013.01.js I don't get any value and alerts at all using the same code below just replacing the reference of the scripts. Have tried re-uploading the scripts using SharePoint Designer but with the same result. We are really stuck now. Please advise.
Arnel
I put 2 alerts on my code. The first alert displays BLANK value but the second one does displays the email address of the current user. Also, using jquery-2.0.3.js and jquery.SPServices-2013.01.js I don't get any value and alerts at all using the same code below just replacing the reference of the scripts. Have tried re-uploading the scripts using SharePoint Designer but with the same result. We are really stuck now. Please advise.
<script src="/Scripts/jquery-1.6.2.js" type="text/javascript"></script>
<script src="/Scripts/jquery.SPServices-0.7.2.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
var userName = $().SPServices.SPGetCurrentUser({
fieldName: "Title"
}); alert(userName);
$("input[Title='Initiator']").val(userName);
});</script><script language="javascript" type="text/javascript">
$(document).ready(function() {
var userEmail = $().SPServices.SPGetCurrentUser({
fieldName: "EMail"
});alert(userEmail);
$("input[Title='InitiatorEmail']").val(userEmail);
});</script>
Thanks,Arnel