How Do I Use This Javascript Linked To A Single Word In A Sentence?


How do I link this javascript:

for(i=0; i<document.links.length; i++){
if(document.links[i].search.indexOf(“S…
document.write(‘Ask seller a question‘);
break; }}
so when it is clicked on single word in a sentence on my wepage it works
thank you

, , , , ,

  1. #1 by boacuts2 at November 8th, 2009

    You need to surround the code you listed in a function block:
    function functionName() {
    … Your code
    }
    Then in your html – type:
    The word to be clicked
    Some good info on http://www.cognize.co.uk

  2. #2 by Anonymous at November 8th, 2009

    hahaha, try writing your own, “ask a question”, “ask seller a question” – that sounds familiar, isn’t there a copyright law or something against stealing other peoples code?

  3. #3 by Jonathan at November 9th, 2009

    Did you nick this from eBay? Tut tut.

(will not be published)
  1. No trackbacks yet.
Powered by Yahoo! Answers