Hi, from this page (uploaded, the original page is protected), I’m trying with a userscript to set the value “Leggere” in Fornitore field (left side one) if empty, but the script isn’t working and nothing is entered.
This is the userscript I’m using:
setTimeout(function()
{
setme = document.querySelector('input[name="cdFornitore"]');
if (setme.value === "") {setme.value="Leggere"};
},100);
This is the original code of the field:
<td colspan="4" class=" ">
<input type="text" name="cdFornitore" value="" maxlength="10" onchange="getFornitoreInve();">
<input type="text" name="nome" value="" maxlength="160" style="width:65%">
<span id="hForn">
<a title="" class="button input-help grid-1" draggable="false" href="javascript:;" onclick="Next.submit(FormDet,'/sebina/catalogazione/D_INV_NUO_COLL.do?operation=helpFornitore');return false;" data-padlock="false">
<span>
Help</span>
</a>
</span>
<input type="hidden" name="idForn" value="">
</td>
Thank you!