aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Attaching advertisements on links,(a href) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Attaching advertisements on links,(a href)" Watch "Attaching advertisements on links,(a href)" New topic
Author

Attaching advertisements on links,(a href)

JasmineS Saeid
Greenhorn

Joined: Jan 10, 2006
Posts: 18
Hi all,

There are many site presently that have the effect as the one pasted below.
http://www.financialexpress.com/fe_full_story.php?content_id=92456

The page gets rendered normally at first and then after a little while some normal text gets converted to links (<a href> ?

Curious to know if this is achieved by parsing the entire document thr Javascript in the 2nd pass and then deciding on some server o/p on which words (normal text) to show links ???

Contributions on this topic would be appreciated

Jasmine .
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
i think you have misinterpreted the situation.
The link that you are talking about are a hrefs from the start itself.
Their styles are altered to give it the illusion of text and when you take the mouse over it it becomes underlined and becomes link.
For more information do a view source on the page and analyse how they have done it. It could be very informative to view the source of a page which you feel is working magically.


Life called,so here I am.<br />Cheers<br />Niki.:-)
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18643
    
    8

I had to start up Internet Explorer to see what you were talking about. If you look at the source for the page you will see that those strangely-underlined things are not <a href="..."> links at all. And if you look at the little box that pops up when you mouse over one of them, you'll see at the bottom right corner "what's this?". I believe that was your question. Have you tried clicking on that?
JasmineS Saeid
Greenhorn

Joined: Jan 10, 2006
Posts: 18
Yes Exactly Paul,

Thanks for ur efforts of viewing the site to get my point.
Now u see Paul, the text is a normal text as seen after doing a "view source".

But this text is getting changed to have a mouse over which displays a small pop up window with the Add content(link). on clicking this link the user is directed to the advertiser's web site.
Any idea how this is accomplished ?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If you would have glanced at the code you would have see this



TADA the magic....

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Attaching advertisements on links,(a href)