Excel VBA fill javascript INPUT boxes

DaLiMan

Active Member
Joined
Jun 1, 2004
Messages
295
At the compagny we have a website for viewing some customer information.
Now I found some scripting here and there that should be able to do this but I cannot seemm to get this to work.

I like to open the website
then fill the dates (BEGIN (vem ?) and END (tem ?) )
Also fill in customernumber (I think it is called KLTNUM in the code....)
click show. (button called "Toon")

Below is the source from the webpage, can onyone help with determine which are the right field names
And give a little VBA code sample on how to start?

<code>
<TITLE>Kwaliteitsregistratie per klant
</TITLE>
******** id=IBI_OptionsScript type=text/javascript>
var rltVersion = "714";
var cgipath = "cgipath";
var ibirls = "ibirls2";
var multidrill = "multidrill";
var mntFormValidate = "mntFormValidate";
var dyncalendar = "dyncalendar";
var olap="olap";
var olappanebase="olappanebase";
var ibixmltree="ibixmltree";
var ibilangtrans="ibilangtrans";
var olapdrill="olapdrill";
var ibiOptions = new Array(cgipath,ibirls,mntFormValidate,ibilangtrans,dyncalendar,olap,olappanebase,olapdrill,multidrill);
*********>

******** id=IBI_nls src="/ibi_html/javaassist/nls.js" type=text/javascript>*********>

******** id=IBI_ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript>*********>

******** id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);*********>

******** id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
*********>
******** src="/approot/HTML/scripts/jaarselectie.js" type=text/javascript>*********>
<LINK media=screen href="/approot/HTML/css/rapport_new.css" type=text/css rel=StyleSheet>
<LINK media=all href="/approot/HTML/scripts/Kalender/style/Kalender_TU.css" type=text/css rel=stylesheet>
******** src="/approot/HTML/scripts/Kalender/script/calendar.js" type=text/javascript>
*********>
******** src="/approot/HTML/scripts/Kalender/script/calendar-setup.js" type=text/javascript>
*********>
******** src="/approot/HTML/scripts/Kalender/lang/calendar-du.js" type=text/javascript>
*********>
******** src="/approot/HTML/scripts/rightmenu.js" type=text/javascript>
******** id=IBI_nls src="/ibi_html/javaassist/nls.js" type=text/javascript>*********>
******** id=clientEventHandlersJS type=text/javascript>
function window_******() {
var requiredfrom = "avkf0001.htm";
var requiredfrom1 = "avkf0020";
var requiredfrom2 = "/approot/Kwaliteitsregistratie/avkf0001_body.htm";
if (document.referrer.toUpperCase().indexOf(requiredfrom.toUpperCase()) == -1 && document.referrer.toUpperCase().indexOf(requiredfrom2.toUpperCase()) == -1
&& document.referrer.toUpperCase().indexOf(requiredfrom1.toUpperCase()) == -1)
{
//****************="http://portal/tumenu";
}
//document.getElementById('rapportholder').style.display = (fex.toUpperCase() == "_avkf0002".toUpperCase())? 'block' : 'none';
UpdateData();
}
function button1_*******(ctrl) {
OnExecute(ctrl)
}
*********>
******** type=text/javascript>
var fex = "!IBI.AMP.FOCFOCEXEC;";
function submitten()
{
VEMDTC.value="!IBI.AMP.VEMDTC;";
TEMDTC.value="!IBI.AMP.TEMDTC;";
OUTPUT.value="EXCEL";
KLTNUM.value="!IBI.AMP.KLTNUM;";
OnExecute(button1);
return;
}
function verifyNumericKlt(kltnum) {
var tKLTNUM=kltnum;
if (tKLTNUM != '') {
if (!tKLTNUM.match(/[^0-9]/)) {
return true;
} else {
alert("Klantnummer dient numeriek te zijn");
return false;
}
}
}

function ShowMenu(URL, WinTitle, WinWidth, WinHeight, WinLeft, WinTop){
attr = "resizable=no,width=" + WinWidth + ",height=" + WinHeight + ",screenX=" + WinLeft + ",screenY=" + WinTop + ",left=" + WinLeft + ",top=" + WinTop + "";
msgWindow=open(URL, WinTitle, attr);
if (msgWindow.opener == null) msgWindow.opener = self;
}
*********>
******** for=window eventname="******">window.****** = function() { window_******(); }*********>
<BODY>
******** type=text/javascript>
eyesys_title=""
eyesys_titlecol1="RGB(44,82,119)"
eyesys_titlecol2="white"
eyesys_titletext="white"
eyesys_bg="RGB(137,194,214)"
eyesys_bgov="#006699"
eyesys_cl="RGB(44,82,119)"
eyesys_clov="white"
eyesys_width=160
eyesys_init()
eyesys_item('Achteruit','/approot/HTML/images/arrow_left.gif','javascript:history.back();')
eyesys_item('Vooruit','/approot/HTML/images/arrow_right.gif','javascript:history.forward();')
eyesys_item('Afdrukken',null,'javascript:window.print();')
eyesys_item('Open in excel','/approot/HTML/images/ico-exl_small.gif','javascript:submitten();')
eyesys_close()
*********>
<DIV id="outer">
<!-- Begin outer -->
<FONT class="koptekst">Kwaliteitsregistratie per klant</FONT>
<!--begin inner--><DIV id="inner" style="width:400px;margin-top:15px;">
<div style="width:110px;" class="labelcontainer">
<div class="normlabels" style="line-height: 30px;">
Periode van:<br />
Klantnummer:<br />
</div>
</div>
<div style="width:270px;" class="selectcontainer">
<div class="labelcontainer" style="margin-bottom:12px;">
<DIV class="selectcontainer" id="sel1" style="width:100px;height:20px;">
<input type=text name=VEMDTC id=vem style="width:100px;height:20px;margin:0px;padding:0px;">
******** type="text/javascript">
Calendar.setup({
inputField : "vem",
ifFormat : "%d-%m-%Y"
})
*********>
</div>
<div class="selectcontainer">
t/m
</div>
<DIV class="selectcontainer" id="sel3" style="width:100px;height:20px;">
<input type=text name=TEMDTC id=tem style="width:100px;height:20px;margin:0px;padding:0px;">
******** type="text/javascript">
Calendar.setup({
inputField : "tem",
ifFormat : "%d-%m-%Y"
})
*********>
<input type=hidden name="OUTPUT">
</div>
</div>
<div class="normselect" style="margin-left: 6px;">
<input type="text" name="KLTNUM" onChange="return verifyNumericKlt(this.value)" id="sind" value="0" maxlength=7 size=8><br />
</div>
</div>
<div class="submitcontainer" style="width:110px;top:18%;text-align:right;padding-right:2px;margin-right:2px;">
<INPUT ******************** class=button id=button1 *******=button1_*******(this) type=button value="Toon" name="button1" requests_list="0" >
</div>
<!-- eind inner div --></div>
<div id="rapportholder" style="margin-top:15px;" >!IBI.FIL.RAPPORT;</div>
</FORM>
<!--eind outer--></div>
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value="Kwaliteitsregistratie BASEAPP" name=ibiapp_app>
<xml id=ibi_requests>
<requests>
<request requestid="0" targettype="0" targetname="_self" sourcetype="typeFex" ibif_ex="avkf0002.fex" ibic_server="EDASERVE" ibiapp_app="Kwaliteitsregistratie ABSEAPP">
<variables>
<variable field="" file="sqlout.mas" desc="" datatype="0" operation="" name="VEMDTC" accept="0" type="default" select="0" controltype="7">
</variable>
<variable field="" file="sqlout.mas" desc="" datatype="0" operation="" name="TEMDTC" accept="0" type="default" select="0" controltype="7">
</variable>
<variable field="" file="sqlout.mas" desc="" datatype="0" operation="" name="KLTNUM" accept="0" type="default" select="0" controltype="7">
</variable>
<variable field="" file="sqlout.mas" desc="" datatype="0" operation="" name="OUTPUT" accept="0" type="default" select="0" controltype="7">
</variable>
</variables>
</request>
</requests>

</code>
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top