aplelois
asked on
go to next page
hello,
I would like to create soemthing so that when I click this button
WebBrowser1.Navigate(New System.Uri("http :// domain com"))
it goes to this page and then click on next >>
then next, next, etc...
<a href="javascript:back(1);" ><< back </a>| <a href="javascript:next(3);" >next >></a>
page3 has javascript:next(4);
page4 has javascript:next(5);
so on.. how can I do this ?
I would like to create soemthing so that when I click this button
WebBrowser1.Navigate(New System.Uri("http :// domain com"))
it goes to this page and then click on next >>
then next, next, etc...
<a href="javascript:back(1);"
page3 has javascript:next(4);
page4 has javascript:next(5);
so on.. how can I do this ?
Are you wanting to let a button on your form send these commands to the webbrowser control? Or are you just wanting the user to click the links in the webbrowser control and have it go to the next page?
ASKER
yes = Are you wanting to let a button on your form send these commands to the webbrowser control
I answered a similar question to this a while back. Check this post out:
https://www.experts-exchange.com/questions/21524297/executing-javascript-using-webbrowser-control.html
https://www.experts-exchange.com/questions/21524297/executing-javascript-using-webbrowser-control.html
ASKER
this is my javascript
function next(pageNumber)
{
theForm.page.value = pageNumber;
theForm.action = "search.php";
theForm.submit();
return true;
}
function next(pageNumber)
{
theForm.page.value = pageNumber;
theForm.action = "search.php";
theForm.submit();
return true;
}
I haven't done this in a while. Let me do some testing and I'll get back to you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm about to leave the office for the evening. I'll check your responses in the morning.
ASKER
I get these two things
Error 1 Type 'mshtml.HTMLDocumentClass' is not defined.
Error 2 Type 'mshtml.HTMLScriptElementC lass' is not defined.
Error 1 Type 'mshtml.HTMLDocumentClass'
Error 2 Type 'mshtml.HTMLScriptElementC
Do you have a webbrowser control in your application? That class should be added as a reference. If it is not then look here:
C:\WINDOWS\assembly\GAC\Mi crosoft.ms html\7.0.3 300.0__b03 f5f7f11d50 a3a\Micros oft.mshtml .dll
I'm running XP Pro SP2 and that is where M$ installed that DLL for me. Perhaps it is there for you. If not, just search your drive for that DLL and add it as a reference in your app.
C:\WINDOWS\assembly\GAC\Mi
I'm running XP Pro SP2 and that is where M$ installed that DLL for me. Perhaps it is there for you. If not, just search your drive for that DLL and add it as a reference in your app.
ASKER
done, now this
Error 1 Value of type 'System.Windows.Forms.Html Document' cannot be converted to 'mshtml.HTMLDocumentClass' .
Dim doc As mshtml.HTMLDocumentClass = Web.Document
error = Web.Document
Error 1 Value of type 'System.Windows.Forms.Html
Dim doc As mshtml.HTMLDocumentClass = Web.Document
error = Web.Document
ASKER
I had to change it to -> WebBrowser1.Document.DomDo cument
ASKER
ok i have a problem the html page doesnt have any type="button" it only has this
<a href="javascript:GotoPage( 1);">1</a>
<a href="javascript:GotoPage( 2);">2</a>
<a href="javascript:GotoPage( 3);">3</a>
<a href="javascript:GotoPage( 4);">4</a>
<a href="javascript:GotoPage( 5);">5</a>
<a href="javascript:GotoPage(
<a href="javascript:GotoPage(
<a href="javascript:GotoPage(
<a href="javascript:GotoPage(
<a href="javascript:GotoPage(
ASKER
got it thanks
So everything works now?
ASKER
yes