lundi 26 septembre 2016

vba write to HMTL website not recognized by backend

This is going to be hard to explain....

So I'm writing into an HTML form using the following VBA code:

    ----------------------------------------------------------------
    With web.document
                .getelementbyid("Checkbox1").Checked = cYwrite
                .getelementbyid("Textbox1").Value = cCwrite
                .getelementbyid("Checkbox2").Checked = cNAwrite
    End With
    -----------------------------------------------------------------

I can visually confirm that this is working, however when I click the "SAVE" button on the page, it doesn't recognize any of the data (check boxes or text) that's put into the form this way. I've tried using the .getelementbyid().click to simply click the text boxes, and then click the save button, at which point the data is recognized, but the problem with this method is that one of the entries is a textbox, and the .click method doesn't work on the text box (it only seems to work on the check boxes). My initial thought was to just .click on the textbox then use sendkeys to type the comment, but it doesn't seem to work that way...

The HTML code looks like this for the check box:

    <input name="RadGrid_ElectronicCheckList$ctl00$ctl04$CheckBoxList_TaskStatusID$0" id="RadGrid_ElectronicCheckList_ctl00_ctl04_CheckBoxList_TaskStatusID_0" onclick="MutuallyExclusiveCheckBoxListAndSetFieldTech(this, '0');" type="checkbox">

And like this for the textbox:

    <input name="RadGrid_ElectronicCheckList$ctl00$ctl04$ElectronicChecklistGrid_TextBox_Comment" class="riTextBox riEnabled" id="RadGrid_ElectronicCheckList_ctl00_ctl04_ElectronicChecklistGrid_TextBox_Comment" type="text" size="20" maxlength="255" value="">

Any ideas are appreciated, thanks!




Aucun commentaire:

Enregistrer un commentaire