I am having few fields like single line of text
, choice field
, rich text
on my customnewform.aspx
of my SP 2010 SPList
.
Now if I enter a value say USA on the text box, I need to set the dropdown/choice field value as Boeing if I enter the text box value as Europe then the choice field value must be set to Airbus.
The choice field contains many values,like company1, company2, company3, company4 along with Boeing, Airbus etc
How this can be achieved using SPutility & jQuery & JavaScript ?
Am trying to use onblur function of my textbox. Will this work ?
Also I need to get the validation done within the PreSaveAction function call also.
<script language="javascript" src="/project/EASAssetsLib/jquery-
1.6.0.min.js" type="text/javascript">
</script><script language="javascript"
src="/project/EASAssetsLib/jquery.SPServices-2014.01.min.js"
type="text/javascript"></script><script language="javascript"
src="/project/EASAssetsLib/prototype.js" type="text/javascript">
</script><script language="javascript"
src="/project/EASAssetsLib/SPUtility.js" type="text/javascript">
</script>
<script language="javascript" type="text/javascript">
$(document).ready(function()
{
var txtboxfromSPUTIL = SPUtility.GetSPField('countryname').GetValue();
alert(txtboxfromSPUTIL);