Page 1 of 1

inline ads

Posted: Fri Aug 10, 2007 9:53 pm
by m2babaey
Hi
i was using iframes with src=http://mydomain.com/adgenerator.php?referrer=username to display ads on other sites. Now I need to display inline ads like what you see on mouseover on underlined words at http://takfekr.com/inline.html
How can I do that? ( Please tell me if there is a solution other than Javascript)
Thanks

Posted: Fri Aug 10, 2007 9:59 pm
by s.dot
I'm pretty sure javascript is the only way, since those type of ads render the page and then call the javascript function(s) to render the ads on the appropriate words.

Unless you're supplying the ads yourself (in which case you could parse the page with php and hardcode ad links), I think you're going to have to stick with javascript for that.

Posted: Fri Aug 10, 2007 10:07 pm
by m2babaey
so what should i study in js? to get the problem solved quickly? :? :?: :roll:
I just know the basic js
thanks

Posted: Sat Aug 11, 2007 7:14 am
by superdezign
m2babaey wrote:so what should i study in js? to get the problem solved quickly? :? :?: :roll:
Quickly? Inline ads aren't exactly created by amateur programmers, so there is no quick and easy fix. What kind are you after? The mini pop-up boxes on certain words?

I think you'll need to familiarize yourself with the DOM in order to traverse it, check all of the text for keywords, break the #text nodes, splice out the key word, replace the keyword with an element (anchor, or whatever) that shows that it is a keyword, and then creating a floating element to be displayed upon mouseover.