# JavaScript help



## MarkA (Mar 23, 2002)

Hi, I modified a DynamicDrive JavaScript game for my page. I put it up at http://members.truepath.com/tiggerfan/games.html and I'd like it if ya'll could try it out and tell me if you're having trouble getting the difficulty level setting to work, and if so if you know how to fix it (of course, feel free to report any other bugs...)

Thanks,

Mark


----------



## MarkA (Mar 23, 2002)

Anybody? (Specifically Opera users, I'm having the problems in Opera mainly)


----------



## James_F (Apr 23, 2002)

Works fine in IE and Mozilla... Don't have Opera...

I'll try it on Macintosh later, but I would assume it works just as well...


----------



## MarkA (Mar 23, 2002)

Yup, it works fine for me in IE and Mozilla also. Sometimes it works in Opera, sometimes you have to click the buttons for difficulty a few times, then it works, sometimes it seems to work but the X and O images only load half-way or so.


----------



## JBKing (Mar 23, 2002)

Admin request....

Can we give Mark his own forum so he can solicit help on his webpage in just one forum? Seems like half of his posts now are either looking for help or trying to get people to his website.


----------



## MarkA (Mar 23, 2002)

WHAT????? I've made ONE THOUSAND FOUR HUNDRED AND TWENTY TWO posts. At MOST TWENTY TWO of those are connected to my website. And isn't the computer talk forum for asking about computers (just like Steve asking about image editing in it.) I asked a question about JavaScript. I did not post an ad for my site.


----------



## MarkA (Mar 23, 2002)

And to make you, Mr. Avatar-stealer, even happier I just shortened my sig.


----------



## JBKing (Mar 23, 2002)

Geez, don't take things so literal. I said it "seems" like half are about your website.

BTW, nice new avatar! Someone stole your old one?


----------



## MarkA (Mar 23, 2002)

Now do you have any ideas why Opera doesn't seem to like my poor little JavaScript, avatar-stealer?


----------



## JBKing (Mar 23, 2002)

Well, it worked fine under IE, no problems at all. I've never used Opera, so I can't help you there.

Hey....wait a minute....that was just a trick to get me to go to the website! :bang


----------



## MarkA (Mar 23, 2002)

No, it wasn't. And if you used Opera you might have been lucky enough to see why I was asking in the COMPUTER TALK forum for COMPUTER help.  Besides, if I was going to trick you to visit, it would be to the links page or the index page (the KidPlanet index, not the GalaxyM index) - because that's where I get link exchange credits from (I'm not mean enough to put a banner on every page - yet)


----------



## JBKing (Mar 23, 2002)

> _Originally posted by JBKing _


Chill man, Joke!

Actually, perusing your sites, it's looks pretty good. Nice job!


----------



## MarkA (Mar 23, 2002)

Thanks. I just wish my little game worked RELIABLY in Opera!


----------



## MarkA (Mar 23, 2002)

Oh, and I almost forgot about my other Opera JavaScript question for any of you - look at ANY of the KidPlanet pages (but not HomeTech yet ) and you'll see a logo in the bottom right-hand corner (designed to look like a TV bug, it's semi-transparent in Mozilla). But Opera doesn't show this. Is this a problem with my script? Or with Opera?


----------



## James_F (Apr 23, 2002)

Don't take this the wrong way, but who cares about Opera? If they have 1% of all browser traffic i'd be surprised. As long as it works with IE or Netscape, I wouldn't worry about it. Opera has always had trouble with Javascript. For one site I had to program a whole seperate page for Opera because the owner used it. I'd look at the logs over the course of 6 months and he was the only person using Opera on the site....


----------



## MarkA (Mar 23, 2002)

But remember, Opera comes set to ID itself as Internet Explorer (a feature I HATE because I can't know who's using Opera) - therefore, many more could have been using Opera than you knew about.


----------



## James_F (Apr 23, 2002)

True, but why care? IE is that web standard now, so why try and work older browsers in. Mozilla seems to support most of the standards out there that IE does so pages render correctly.

This is how I detect Opera 6...

if ((navigator.userAgent.indexOf("Opera 6")!=-1)
||(navigator.userAgent.indexOf("Opera/6")!=-1))

The first line detects opera if its not set as "Opera". Meaning that if you are emulating IE/Mozilla or others it will detect it. But you need the second line to detect when the user has it set as "Opera". I know that will make sense you Mark.


----------



## MarkA (Mar 23, 2002)

Oh, I agree in that sense. I design all my pages with Mozilla in mind, as it offers the most design features - and with AOL switching over, a LOT more people will be using it soon. I make sure the pages look acceptable in IE and Opera. It's just I'd still like them to look as good as possible in Opera. Also, I need to go out and buy myself a hardware modem so I can check out how they look in Konqueror


----------



## James_F (Apr 23, 2002)

I'm not saying don't test them in Opera, just I've never been able to get some JavaScript pages to work in Opera that work in Mozilla/IE... :shug:


----------



## JBKing (Mar 23, 2002)

Mark, I agree with James. 1% of your potential audience is just not worth it. Better to use your time creating more content that will drive more people to your site.


----------



## MarkA (Mar 23, 2002)

LOL JBKing, now I don't honest expect people to visit my site. Or at least not do what I want them to.

- NOBODY has posted a message to HomeTech Planet forums, despite the link being widely available,

- ONLY RAGE (and one other anonymous who I think may have been Rage) has ever posted a message to KidPlanet - and that was many month's ago when the site was Mark's World (or something like that). And that that it was basically just a test message.

So, really, I'm doing this for myself. If people decide they want to visit it, that's their deal. I just want to learn more about web pages.


----------



## MarkA (Mar 23, 2002)

"if ((navigator.userAgent.indexOf("Opera 6")!=-1)
||(navigator.userAgent.indexOf("Opera/6")!=-1))

The first line detects opera if its not set as "Opera". Meaning that if you are emulating IE/Mozilla or others it will detect it. But you need the second line to detect when the user has it set as "Opera". I know that will make sense you Mark. "

Thanks very much!


----------



## James_F (Apr 23, 2002)

Let me know if it works! I haven't tried it yet on my end other than a local test...


----------



## MarkA (Mar 23, 2002)

Will do once I get the time to work on seperate pages


----------



## James_F (Apr 23, 2002)

Isn't it summer for you? You should have plenty of time! :lol:


----------



## MarkA (Mar 23, 2002)

Exactly And I don't have any real stable job this summer - making it easier (I've done some computer repair for friends - made almost $100 on one job that took an hour. Nice guy )


----------



## MarkA (Mar 23, 2002)

Note - I do NOT make an average of $100/hr. That was a REALLY REALLY REALLY REALLY REALLY nice job to take on


----------



## James_F (Apr 23, 2002)

:lol: Did you pay taxes on that one??? 

Or was it a "cash" deal...


----------



## MarkA (Mar 23, 2002)

I have had actual jobs (like at fast-food places, eventually you have to quit or you go insane man. I was gone so much of this summer, so I decided not to even bother this time around) - so I know to file all necessary paperwork and pay all fees this government imposes on us.


----------



## James_F (Apr 23, 2002)

Well you are one of the few... :righton:


----------

