Page 1 of 1
How to call a HTML file with anchoring
Posted: Mon Dec 02, 2013 6:36 am
by SkyManager
Hello, could anybody show me how to do this?
I want to call up a local hard-disk HTML file in a web browser and position to an anchoring ID
HTML file :
Code: Select all
<HTML><BODY>
TEST
<a href='aaa'>TEST-AAA</a><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<a href='bbb'>TEST-BBB</a><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<a href='ccc'>TEST-CCC</a><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
</BODY></HTML>
I have tried to RunProgram with parameter but failed
Re: How to call a HTML file with anchoring
Posted: Mon Dec 02, 2013 12:27 pm
by AndrewM
Not sure but my URL's start with
.
Re: How to call a HTML file with anchoring
Posted: Mon Dec 02, 2013 6:44 pm
by Perkin
are you including the full filename before the hash
test.help.html#ccc
Re: How to call a HTML file with anchoring
Posted: Mon Dec 02, 2013 7:15 pm
by Kiffi
test.
html:
Code: Select all
<HTML><BODY>
TEST
<a name='aaa' href='#aaa'>TEST-AAA</a><br /><div style="height:1000px"></div>
<a name='bbb' href='#bbb'>TEST-BBB</a><br /><div style="height:1000px"></div>
<a name='ccc' href='#ccc'>TEST-CCC</a><br /><div style="height:1000px"></div>
</BODY></HTML>
PureBasic-Code:
Code: Select all
RunProgram([PathToYourBrowser], "c:/test.html#ccc", "")
Greetings ... Kiffi
Re: How to call a HTML file with anchoring
Posted: Tue Dec 03, 2013 12:19 pm
by AndrewM
This might not be the best place to ask but is there a good example of writing out a html text file on the PB site that is data driven. I gave up using ms-access reports long ago and write VBA procedures that export html. They look like Rhtml which is written in Ruby. I am just wondering if there are any styles and conventions in PB? Another question that is more closely related to this tread would be is it possible to create a lump of html text in a text variable and pass this to the browser control instead of pointing the browser control at a saved text file?
Re: How to call a HTML file with anchoring
Posted: Tue Dec 03, 2013 2:40 pm
by Kiffi
AndrewM wrote:is it possible to create a lump of html text in a text variable and pass this to the browser control instead of pointing the browser control at a saved text file?
Code: Select all
SetGadgetItemText(YourBrowserGadget, #PB_Web_HtmlCode, YourHtml.s)
Greetings ... Kiffi
Re: How to call a HTML file with anchoring
Posted: Tue Dec 03, 2013 11:33 pm
by utopiomania
Code: Select all
RunProgram([PathToYourBrowser], "c:/test.html#ccc", "")
Thanks Kiffy