iraychen / colorpickerjs

Automatically exported from code.google.com/p/colorpickerjs
MIT License
0 stars 0 forks source link

ERROR ON Internet Explorer if code is between <div></div> tags #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In Internet Explorer, if I place the whole code between <div> </div> it
gives an error, I just tried on the example. Put a <div> after <body> and
</div> before </body> and an error will pop up

What is the expected output? What do you see instead?

It shouldnt give error

What version of the product are you using? On what operating system?

1.0 internet explorer 6 or 7 on windows

Please provide any additional information below.

Original issue reported on code.google.com by rbr...@gmail.com on 24 Aug 2008 at 10:46

Attachments:

GoogleCodeExporter commented 9 years ago
has someone find a solution , i have the same problem :(

Original comment by mecha.ma...@gmail.com on 15 Oct 2008 at 3:12

GoogleCodeExporter commented 9 years ago
i will look into this. thanks for the report, and confirmation.

Original comment by matthias...@gmail.com on 15 Oct 2008 at 3:15

GoogleCodeExporter commented 9 years ago
I'm having the same issue as Mecha.
This happens both with version 0.9 and 1.0...

Original comment by symen.ti...@gmail.com on 31 Oct 2008 at 4:27

GoogleCodeExporter commented 9 years ago
Here is the fix/workaround:

<script type="text/javascript">
Event.observe(window, "load", function() {
  ["1", "2", "3"].each(function(idx) {
    new Control.ColorPicker("colorfield" + idx, { IMAGE_BASE : "img/" });
  });
  new Control.ColorPicker("colorfield4", { "swatch" : "colorbox4" });  
})
</script>

Seems that you have to call the script after the div is closed, or you call it 
on
window load. (in ie 6/7)

Original comment by matthias...@gmail.com on 1 Nov 2008 at 1:31