gerkintrigg Posted January 18, 2010 Share Posted January 18, 2010 I tried to create a colour picker component for forms, using JavaScript. You can see the example here:http://www.myointernational.com/shine/testy.php (being javascript, just view source for the code... if you want to use it, go ahead. For some reason I can't get it to work in firefox. It works fine in Chrome and IE6+ but Firefox 3.5.7 is just not showing the "popup" div. Can anyone suggest what might be causing the issue and try to replicate it... I'm not sure if it's just this machine... Suggestions please? Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted January 18, 2010 Share Posted January 18, 2010 Browsers use different event models. This is why cross-browser errors tend to crop up. In order to ensure your code works well in all browsers, you'll need to equalize the event models: function functionName(evt) { evt = (evt) || window.event; // function processing here } This is one of the reasons why people use frameworks - they equalize the event models out of the box. Also, just for your own sanity, and for those of us who you ask to look through your code, you should really move your CSS to an external file. It's very difficult reading your code with a bunch of inline stylesheets in every element. Quote Link to comment Share on other sites More sharing options...
gerkintrigg Posted January 19, 2010 Author Share Posted January 19, 2010 Yeah, I was planning on doing that... thanks for the help. It may just be because of the time of day (night) but I can't work that out. I'll try again when I wake. Cheers! Quote Link to comment Share on other sites More sharing options...
meomike2000 Posted January 20, 2010 Share Posted January 20, 2010 when using fire fox, click on tools at the top under where u would enter your url, then click on error console, that should help you find your problem.... Quote Link to comment Share on other sites More sharing options...
gerkintrigg Posted January 21, 2010 Author Share Posted January 21, 2010 thanks meomike2000, I'll give that a go. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.