D
David
Hello
I cannot find the answer to this question anywhere. Please help.
I am using IE automation in Excel to grab information from different sites.
For the first time I have come across a website that uses buttons without
naming them. I have an example code below. I would like to automate clicking
the View Forms button. There seems to be no information to grab in order to
isolate the button and click on it
Anyone got any ideas?
Thanks
David
<html>
<head>
....
function SubmitForm() {
if (CSValidation()) {
pop('?lang=en'); document.GEOptions.submit();
}
}
function ResetForm() {
pop('?lang=en'); document.GEOptions.submit();
}
function HiliteControlContents() {
// alert(event.srcElement.type);
event.srcElement.select();
}
//-->
</script>
<script language='JavaScript' type='text/javascript'><!--
function CSValidation() {
var bRv = true;
return bRv;
}
//--></script>
</head>
<body onload="unpop();">
<div id="container">
<div id="header">
<img id="logo_en" src="images\header.jpg">
</div>
<div id="content">
<form name="GEOptions" method="post"
action="GEOptions.aspx?lang=en&st=sl&sesid=" id="GEOptions">
<input type="hidden" name="__VIEWSTATE"
value="dDwxMjAzMTM2NjU1Ozs+LAMHbXDQNveW/O6OLl+hxQiw32M=" />
<span id="XMLSessionMgr"></span>
<input type='hidden' id='SesID' name='SesID' value='' /><input type='hidden'
id='DebugID' name='DebugID' value='21' />
<input type=hidden id="button" name="button" >
<table>
<tr>
<td colspan="2" align="left">
<h1>Options Menu</h1>
</td>
</tr>
<tr>
<td>
<div class="ButtonBox">
<div class="Button">
<a href="javascript:document.GEOptions.button.value='newform';SubmitForm();">
<div class="ButtonText">New Form</div>
</a>
</div>
</div>
</td>
<td> <h2>Create a new Form</h2> </td>
</tr>
<tr>
<td>
<div class="ButtonBox">
<div class="Button">
<a
href="javascript:document.GEOptions.button.value='editform';SubmitForm();">
<div class="ButtonText">Edit Form</div>
</a>
</div>
</div>
</td>
<td>
<h2>Edit an existing form in user tools</h2>
</td>
</tr>
<tr>
<td>
<div class="ButtonBox">
<div class="Button">
<a
href="javascript:document.GEOptions.button.value='viewforms';SubmitForm();">
<div class="ButtonText">View Forms</div>
</a>
</div>
</div>
</td>
<td>
<h2>View all forms in spreadsheet view</h2>
</td>
</tr>
</body>
</html>
I cannot find the answer to this question anywhere. Please help.
I am using IE automation in Excel to grab information from different sites.
For the first time I have come across a website that uses buttons without
naming them. I have an example code below. I would like to automate clicking
the View Forms button. There seems to be no information to grab in order to
isolate the button and click on it
Anyone got any ideas?
Thanks
David
<html>
<head>
....
function SubmitForm() {
if (CSValidation()) {
pop('?lang=en'); document.GEOptions.submit();
}
}
function ResetForm() {
pop('?lang=en'); document.GEOptions.submit();
}
function HiliteControlContents() {
// alert(event.srcElement.type);
event.srcElement.select();
}
//-->
</script>
<script language='JavaScript' type='text/javascript'><!--
function CSValidation() {
var bRv = true;
return bRv;
}
//--></script>
</head>
<body onload="unpop();">
<div id="container">
<div id="header">
<img id="logo_en" src="images\header.jpg">
</div>
<div id="content">
<form name="GEOptions" method="post"
action="GEOptions.aspx?lang=en&st=sl&sesid=" id="GEOptions">
<input type="hidden" name="__VIEWSTATE"
value="dDwxMjAzMTM2NjU1Ozs+LAMHbXDQNveW/O6OLl+hxQiw32M=" />
<span id="XMLSessionMgr"></span>
<input type='hidden' id='SesID' name='SesID' value='' /><input type='hidden'
id='DebugID' name='DebugID' value='21' />
<input type=hidden id="button" name="button" >
<table>
<tr>
<td colspan="2" align="left">
<h1>Options Menu</h1>
</td>
</tr>
<tr>
<td>
<div class="ButtonBox">
<div class="Button">
<a href="javascript:document.GEOptions.button.value='newform';SubmitForm();">
<div class="ButtonText">New Form</div>
</a>
</div>
</div>
</td>
<td> <h2>Create a new Form</h2> </td>
</tr>
<tr>
<td>
<div class="ButtonBox">
<div class="Button">
<a
href="javascript:document.GEOptions.button.value='editform';SubmitForm();">
<div class="ButtonText">Edit Form</div>
</a>
</div>
</div>
</td>
<td>
<h2>Edit an existing form in user tools</h2>
</td>
</tr>
<tr>
<td>
<div class="ButtonBox">
<div class="Button">
<a
href="javascript:document.GEOptions.button.value='viewforms';SubmitForm();">
<div class="ButtonText">View Forms</div>
</a>
</div>
</div>
</td>
<td>
<h2>View all forms in spreadsheet view</h2>
</td>
</tr>
</body>
</html>