Jump to content


Bubbles Javascript Problem


  • You cannot reply to this topic
10 replies to this topic

#1 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 30 May 2006 - 08:44 AM

G'day,

I came across a neat bit of Javascript that leaves a set of trailing bubbles on the screen. It would be a really neat thing to add to a site I've been playing with.

I can get it to work in IE with the example test01.htm document, but when I put this into Etomite it stops working. If I add my typical doctype tag as per example test02.htm, it also stops working with IE.

And neither test01.htm or test02.htm work with Firefox.

Therefore I suspect it's not the logic of the Javascript that's the problem. It's probably something to do with the HTML code the Javascript is writing to the document. But I'm stumpted as to what it is.

If someone out there can spot what I'm missing, I'd very much appreciate the solutions.

The attached ZIP file has in it the six graphics files, the javascript file, plus two example HTML files.

Best Regards, Lloyd Borrett.

Attached Files



#2 Jelmer

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,173 posts

Posted 30 May 2006 - 10:24 AM

<< Argh! Trailing bubbles! >>

I'll take a look after lunch...

Edited by Jelmer, 30 May 2006 - 10:25 AM.


#3 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 30 May 2006 - 11:14 AM

<< wonders what he's missing as the files supplied dont work here in FF ... all i get is a black page and a few bubbles static in the top corner of the page with the test01 text in the middle of the page :huh:

Do'h! I just re-read your original post... neither work in FF ... I can also confirm this :lol:

#4 Guest_xrepins_*

  • Guests

Posted 30 May 2006 - 09:54 PM

Do you have the original source site? My JS/Firefox experience tells me that it's usually to do with the doctype.

#5 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 30 May 2006 - 10:39 PM

G'day,

The original site didn't have a doctype in its source. So that's what I've replicated in test01.htm.

But the original site also doesn't work in Firefox.

I really need a solution that works in at least IE with the XHTML Transitional doctype I have in test02.htm. It would be nice if the solution also worked in Firefox.

Best Regards, Lloyd Borrett.

#6 Guest_xrepins_*

  • Guests

Posted 30 May 2006 - 11:22 PM

Bah! I managed to get it working in IE and Firefox with no doctype, but the moment you add a doctype to the mix, it all goes south-bound.

If I recall correctly, the Tigra Hints script used to have the same problem and it was caused by a position absolute in the script, but I'm just not au-fait enough to scrawl through the tigra script and see what they did to resolve it. (It works fine in the latest vesrion.)

#7 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 31 May 2006 - 01:23 AM

G'day,

A read of the forum on Tigra Hints gave me some help. It suggested adding 'px' to the end of the top and left values.

As a result, this updated version of bubbles.js causes the IE version with doctype to start working.

But still nothing with Firefox.

Best Regards, Lloyd Borrett.

Attached File  bubbles_ie.txt   1.7K   56 downloads

Edited by lloyd_borrett, 31 May 2006 - 07:53 AM.


#8 Jelmer

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,173 posts

Posted 31 May 2006 - 07:15 AM

Have you tried validating the page with the .js in it?

#9 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 31 May 2006 - 07:52 AM

G'day,

I found an updated version of the script that works with both IE and Firefox in HTML. But once you add the XHTML doctype it too fails. So I tried making similar changes to it as I had to the earlier version, but still no success.

Best Regards, Lloyd Borrett.

Attached File  bubbles_new.txt   2.79K   53 downloads

#10 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 31 May 2006 - 03:15 PM

I'm jumping into this thread in the middle so I'm not sure if this will be of any benefit... Have you, by chance, tried using the script as an include instead of having it be inline Javascript code...??? HTML will always validate (if it is valid, that is), and sometimes function better, when the script is external... I ran into a similar situation a few weeks ago so I felt it worthwhile to mention... B)

#11 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 31 May 2006 - 10:00 PM

G'day,

Ralph: It is being included rather than being inline code.

This version gets it working in Firefox. But the Y axis for IE6 is still not working.

Best Regards, Lloyd Borrett.

Attached File  bubbles_new_v2.txt   2.8K   68 downloads





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users