Edit or Scrape HTML Page's Text Box data

Kreiz

New Member
Joined
May 6, 2011
Messages
38
Hello,

I've scoured the globe and found how to automate almost every page I utilize on a daily basis :D Thank you forums and Google!

Next feet to overcome is actually scraping or changing the string in a textbox from the active webpage.

I am able to enter data into the inputboxes on the forms but how do you change the data or what I REALLY need is after I fill this Webpage's form out (Do not have access to edit the page), and run the calculate button on the page a text box id 'ed "total_miles" will populate with the miles between the 2 places. Here's the kicker, the value in the coding doesn't change ie' <input type="text" name="total_miles" id="total_miles" value="" style="width:60;text-align:right;">

Think there is a way to still scrape that number out of the input box even though the value doesnt change??

HTML:
<table class="ls_outer" border='1' cellspacing='0' cellpadding='2'>
		<tr><td class='ls_hedbar2' width="700">Run Miles</td></tr>
		<tr><td class='ls_bigbod' >
				<form name='fatsform'>
				<input type='hidden' name='stop_count' id='stop_count' value='2'>
				<div  style="padding:20 1 1 90;">
				Enter a City and State, or a Zip Code, then click Calculate.<br>
				<br>
				<table id="stop_table" border="0" cellpadding="0" cellspacing="2" style="width:384">
					<tr><td class="fn" style="width: 80"> </td>
						<td class="fn" style="width:130"><div align="center" style="background-color:CDAD00;color:#EEEEEE;">City</div></td>
						<td class="fn" style="width: 30"><div align="center" style="background-color:CDAD00;color:#EEEEEE;">St</div></td>
						<td class="fn" style="width: 60"><div align="center" style="background-color:CDAD00;color:#EEEEEE;">Zip</div></td>
						<td class="fn" style="width: 10"></td>
						<td class="fn" style="width: 60"><div align="center" style="background-color:CDAD00;color:#EEEEEE;">Miles</div></td>
					</tr>										             
					<tr><td><div style='font-weight:bold;font-size:12px;text-align:right;padding-right:5;'>Point #1</div></td>
						<td><input type="text" name="stop_1_city"  id="stop_1_city"  value="" maxlength="18" style="width:130;"></td>
						<td><input type="text" name="stop_1_state" id="stop_1_state" value="" maxlength="2" style="width:30;"></td>
						<td><input type="text" name="stop_1_zip"   id="stop_1_zip"   value="" maxlength="5" style="width:60;"></td>
						<td></td>
						<td><input type="text" name="stop_1_miles" id='stop_1_miles' value="" style="width:60;text-align:right;"></td>
					</tr>										             
					<tr><td><div style='font-weight:bold;font-size:12px;text-align:right;padding-right:5;'>Point #2</div></td>					             
						<td><input type="text" name="stop_2_city"  id="stop_2_city"  value="" maxlength="18" style="width:130;"></td>
						<td><input type="text" name="stop_2_state" id="stop_2_state" value="" maxlength="2" style="width:30;"></td>
						<td><input type="text" name="stop_2_zip"   id="stop_2_zip"   value="" maxlength="5" style="width:60;"></td>
						<td></td>
						<td><input type="text" name="stop_2_miles" id='stop_2_miles' value="" style="width:60;text-align:right;"></td>
					</tr>
				</table>
				<table border="0" cellpadding="0" cellspacing="2" style="width:384">   
					<tr><td width="80" class="norm"><div style='font-weight:bold;font-size:10px;text-align:right;padding-right:5;'>
							<a href='' *******='add_stop_row(); return false;'>MORE POINTS</a></div></td>
					    <td width="160" colspan="2">
					    	<select name='req_type' id='req_type'>
					    		<option value="MI">Shortest Route</option>
					    		<option value="PM">Practical Route</option>
					    	</select></td>
					    <td width="70"><div style='font-weight:bold;font-size:12px;text-align:right;padding-right:2;'>TOTAL  </div></td>
						<td width="60"><input type="text" name="total_miles" id="total_miles" value="" style="width:60;text-align:right;"></td>
					</tr>
					<tr><td></td>
					</tr>
					<tr><td></td>
						<td colspan="3" align="center"><input type="button" value="Calculate" id="miles_button" *******="aj_get_miles()" style="width:180"></td>
						<td></td>
					</tr>
				</table>
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,224,618
Messages
6,179,917
Members
452,949
Latest member
beartooth91

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