Sinatra tutorial - displaying ads

11 views
Skip to first unread message

Kenton

unread,
May 9, 2010, 8:15:46 PM5/9/10
to PeepCode
I'm running through the Sinatra tutorial but can't seem to get ads to
display when using a typical javascript tag in an HTML file.

At about 41:20 into the tutorial, at the end of the section titled
"Displaying Ads", he goes through adding a "script" tag with src =
"http://localhost:9393/ad".

When I do that, then view source on the HTML file, I see that src URL
hyperlinked. If I click the link (still viewing the source at this
point), I see the javascript code I'm expecting.

But back on the HTML page, the ads don't show up.

It's like the browser isn't navigating to the src URL in order to get
the javascript code that needs to be executed.

Any ideas?

Thanks.

--
You received this message because you are subscribed to the Google Groups "PeepCode" group.
To post to this group, send email to peep...@googlegroups.com.
To unsubscribe from this group, send email to peepcode+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/peepcode?hl=en.

Eric

unread,
May 11, 2010, 12:58:41 AM5/11/10
to PeepCode
Have you tried substituting the PeepCode download code for your own
and looking for differences? Can you post your code?

Kenton

unread,
May 15, 2010, 8:32:08 AM5/15/10
to PeepCode
I figured it out...at least for now. There was something weird going
on with the "non-blocking" javascript snippet included in the code
sample. The other version of the javascript code that's included
worked just fine, so I'll stick with that for now.
Reply all
Reply to author
Forward
0 new messages