By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,886 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

Snap.com and dynamic content

P: n/a
I was wondering if anyone has experience with snap.com's service,
where you put a reference to a remote script on your page. The script
causes a small snapshot of a web page to appear wherever the user
mouses over a link on your page.

This is very simple to implement on a static page -- paste in one line
of code. But what about when you have a dynamic page with content
pulled in by AJAX requests? On a static page, the script is loaded
once of course. It would be ridiculous to try to reload the script
every time new content is fetched. So it seems that a hack is called
for.

I'm guessing there's a function within snap's script that can be
called, to reset the mouseover event handler...

Anybody ever deal with this?
Aug 10 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Razzbar wrote:
I was wondering if anyone has experience with snap.com's service, where
you put a reference to a remote script on your page. The script causes a
small snapshot of a web page to appear wherever the user mouses over a
link on your page.
Well, I would not place much confidence in a service which homepage alerts
"This page requires AC_RunActiveContent.js" to a user of Firefox 3.0.1, and
shows 75 errors and 22 warnings when submitted to the W3C Markup Validator.
This is very simple to implement on a static page -- paste in one line of
code. But what about when you have a dynamic page with content pulled in
by AJAX requests? On a static page, the script is loaded once of
course. It would be ridiculous to try to reload the script every time new
content is fetched. So it seems that a hack is called for.
Use a debugger or DOM inspector application to find out what "pasting in one
line of code" actually does when the document is displayed. Then it might
be possible to do something about the result.
I'm guessing there's a function within snap's script that can be called,
to reset the mouseover event handler...
Obviously you have no clue what you are talking about. You would be
well-advised to stay away from the more complex aspects of Web development
as far as you can until that changed.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Aug 10 '08 #2

P: n/a
I was actually interested in the more general question of how to deal
with "ad servers", etc. with dynamic ("ajax") pages. It was my mistake
to frame the question in terms of a specific service.

Dynamic content is a major trend in website architecture, and all of
the (few) ad servers that I've looked at work the same way -- from the
host page coder's pont of view -- by having the host page load a
script from the ad server. From there, it's all a black box as to what
the ad server script does. I know Google's works very different from
Snap's. But the point is, they all do it just once, when the presumed-
to-be-static page loads. They don't update themselves when page
content changes, because they're not designed to do that. Yet.

Don't worry about it.
Aug 11 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.