HTML

J

J Welsby

I have the following snippet of code that displays a scrolling news feed -
have tested it by pasting it into a NotePad document and saving the document
with a .htm extension and it opens fine with Interent Explorer

<script language="JavaScript" type="text/javascript"
src="http://www.insurancejournal.com/newsfeed/ascroll.php"> </script>

Can anyone tell me how to add an object to the main form in our database
that will display the contents of this newsfeed? Is it possible to have
something as simple as a text box object display the data?

Thanks in advance
 
T

Tom van Stiphout

On Wed, 28 Nov 2007 06:56:02 -0800, J Welsby

Not a textbox - it does not know about HTML, but a webbrowser control
would probably work.

-Tom.
 
J

J Welsby

This code produces a single line, horizontal, stream of news headlines. Was
trying to avoid having to use the web browser control - seems like overkill.
Any other suggestions out 'there'?
 
D

Douglas J. Steele

You're interacting with the internet. Using a web browser control is hardly
overkill!

The only other way that I can think of would be to retrieve the content of
the feed into some variable through API calls, and then copy it to a text
box. However, that would only give you a snapshot at the time of execution.
You'd have to run a loop that did it repeatedly to update the text box. All
in all, the web browser control is much simpler (and cleaner).
 
J

J Welsby

Perhaps I can size the browser control to be long and narrow (like a long
text field) and it will display the contents. Can anyone familiar with HTML
tell me how to format the code so the brower control will navigate to the
news feed?

I tried a sub on the form open:
With me.browserctrl
.navigate "-code here-"
End with

But this does not work. Any ideas? Thanks in advance
 
J

J Welsby

Doug, thanks for the code. Have copied it into my open form but nothing
happens - neither errors nor data in the webcontrol appear

Access seems to accept your code but the webcontrol doesnt do anything with it

Did you happen to try the code in a test db to see if it ran?

Thanks and regards, James
 
D

Douglas J. Steele

Yes, I tested it, and it worked fine for me.

In what event have you put the code?
 
J

J Welsby

I first put the code on the open form event. When that did not work I put
it on the click event of a button that I threw on the form. Am stumped! Be
*nice* to get an error for some guidance but no such luck. Form simply opens
and the web control remains blank. Any other ideas?
Cheers, James
 
E

egun

FYI - I tried his code starting with a blank database and new form, and it
worked fine. It took a few seconds for the scrolling to begin. Maybe you
have the control sized too small? Try making it much larger just to see if
anything is there. I put the code in the form open event.

Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top