-2
<!-- Begin of mycountdown.org script -->
<div align="center" style="margin: 15px 0px 0px 0px">
    <noscript>
        <div align="center" style="width: 140px; border: 1px solid #ccc; background: #000000; color: #F9F9FF; font-weight: bold; font-size: 12px;">
            <a style="text-decoration: none; color: #F9F9FF;" href="http://mycountdown.org/My_Countdown/My_Countdown/">My Countdown</a>
        </div>
    </noscript>
    <script type="text/javascript" src="http://mycountdown.org/countdown.php?cp3_Hex=0F0200&cp2_Hex=000000&cp1_Hex=F9F9FF&ham=0&img=&hbg=0&hfg=0&sid=0&fwdt=150&lab=1&ocd=My+Countdown&text1=SONY 50 inch LCD TV&text2=EXPIRES&group=My Countdown&countdown=My Countdown&widget_number=3010&event_time=1357776000&timezone=America/New_York"></script>
</div>
<!-- End of mycountdown.org script -->

It's a countdown clock but when you click on it, it links to a website, which I don't want.

feeela
  • 29,399
  • 7
  • 59
  • 71
Dep
  • 59
  • 8
  • i dont know how to post the code more clear, it stayed as one long line so maybe u can copy it in to a html runner to see what it looks like ! thanks again – Dep Jan 04 '13 at 19:08
  • Here it is on JSFiddle: http://jsfiddle.net/jarble/KCQ5V/ – Anderson Green Jan 04 '13 at 19:09
  • i tried taking out the a to /a and it ddnt work thats why im asking the question – Dep Jan 04 '13 at 19:13
  • @DeePoop I see and would have mentioned earlier if you just had included such information into the question. Please try always to explain where your problems were at. – feeela Jan 04 '13 at 19:15

4 Answers4

3

The <a> is inside a <noscript> tag. If you have JavaScript enabled (most people do), this code is ignored. Thus, removing the anchor will have no effect.

The actual click functionality is being generated by the JavaScript below the <noscript> tag. This is loaded from an external source (http://mycountdown.org/countdown.php...).

If you go directly to that URL, you will see a variety of markup being injected into the page. That's where the clickable regions(s) are coming from. Since it is loading a Flash movie, I doubt you can alter the behavior, i.e. the click events are handled within the movie.

Tim M.
  • 53,671
  • 14
  • 120
  • 163
  • so is there anyway to take it out – Dep Jan 04 '13 at 19:18
  • Probably not without removing the whole Flash movie being loaded. If you want to do that, remove the script tag. – Tim M. Jan 04 '13 at 19:18
  • The "clickable regions" are not defined in JS, but Flash/ActionScript. – feeela Jan 04 '13 at 19:20
  • hmm so how can i make a countdown clock in html without a link, thanks again for the answer to my question before – Dep Jan 04 '13 at 19:21
  • FWIW, here are some relevant search results about editing .swf files: https://www.google.com/#hl=en&sugexp=les%3Beqn%2Ccconf%3D1.2%2Cmin_length%3D2%2Crate_low%3D0.035%2Crate_high%3D0.035%2Csecond_pass%3Dfalse%2Cnum_suggestions%3D2%2Cignore_bad_origquery%3Dtrue%2Conetoken%3Dfalse&gs_rn=0&gs_ri=hp&dc=flash%20mov&ac=2&gs_mss=edit%20flash%20m&tok=aZDZUp6ymiuwrRBrQUmCvA&cp=7&gs_id=2e&xhr=t&q=edit+swf&pf=p&tbo=d&sclient=psy-ab&oq=edit+sw&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&bvm=bv.1355534169,d.dmQ&fp=59d5ff006f2abf7a&bpcl=40096503&biw=1366&bih=584 – Anderson Green Jan 04 '13 at 19:21
  • And if you want to make your own clock, Google "javascript countdown timer" or start here: http://stackoverflow.com/questions/2604450/how-to-create-a-jquery-clock-timer – Tim M. Jan 04 '13 at 19:22
  • 1
    @DeePoop Please try to understand the technology you are using. You simply can't animate/count anything in HTML. That is what scripting languages like JavaScript are made for. And using JavaScript is a much better option, than relying on someone else' Flash program. See my new answer for a workaround. – feeela Jan 04 '13 at 19:37
1

The on click behavior is defined within the Flash object. Thus you need the original Action Script file to remove the link and re-compile it to an SWF object. If you don't own the code, you can't do so. (Well actually you could reverse engineer the whole thing.)

Another option might be to search for some parameter in the documentation to http://mycountdown.org/ (if there is any), which allows to pass in an URL. There you could use # as URL to not link another page. Or maybe there is a parameter that could be used to disable the on click behavior.

Or you could try to use JavaScript to disable the event, but I doubt, that this would play together with Flash.

A working solution is to position another layer (i.e. some DIV) above the counter. Doing so, a click will not be recognized by the Flash animation. This does disable the click, but from my point of view, is a dirty hack.

feeela
  • 29,399
  • 7
  • 59
  • 71
0

Why not simply remove the link ?

<a style="text-decoration: none; color:#F9F9FF;" href="http://mycountdown.org/My_Countdown/My_Countdown/">My Countdown</a>

or convert it

<a style="text-decoration: none; color:#F9F9FF;" href="#">My Countdown</a>
Hanky Panky
  • 46,730
  • 8
  • 72
  • 95
  • How would you remove the link from the embedded Flash applet, as shown here? Is it even possible to do this using JavaScript or HTML? http://jsfiddle.net/jarble/KCQ5V/ – Anderson Green Jan 04 '13 at 19:12
  • I removed the href attribute and it still links to the website. http://jsfiddle.net/jarble/KCQ5V/1/ – Anderson Green Jan 04 '13 at 19:16
  • As Tim explained in his answer below, this is being generated by external script, So i believe you wont be able to remove it. – Hanky Panky Jan 04 '13 at 19:18
0

You can´t the click event is handle by flash object, you need the code and remove the link in flash.

Carlos León
  • 153
  • 1
  • 7