I need the number in brackets, in this case “14” so that I can send it to a JavaScript function on the page to submit or alternatively is there a way to ‘click’ the button “Current week”?
<form id="timetablesForm" action="timetablesController.jsp" method="post">
<p>
<input type="button" name="Current week" value="Current week" onclick="javascript:void+displayTimetable('14')" />
<input type="button" name="Next week" value="Next week" onclick="javascript:void+displayTimetable('15')" />
<input type="button" name="Current semester" value="Semester 1" onclick="javascript:void displayTimetable('7;8;9;10;11;12;13;14;15;16;17;21')" />
</p>
function displayTimetable(selectdweeks)
I’m working in Windows Phone so the WebBrowser.Document isn’t available. I’ve used the script below to set a value in a different form:
webBrowser1.InvokeScript("eval", "document.getElementById('loginform1').user.value = 'username';");
How do I get a value from the HTML page? What other function can I call with InvokeScript? Appreciate it if you can point me at a list of functions.
Use this
Then parse the HTML to get the bit I want