hæ hæ, det er ligesom hvis man downloader en js fil fra nettet, så bliver alle linieskif også udskiftet med en firkant
jeg ved ikke hvorfor siden er sådan
men jeg har udskiftet alle firkanterne med linieskift og har fået følgende >
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="
http://www.w3.org/1999/xhtml"><head>
<title>NoGray Color Picker</title>
<script src="mootools.v1.11.js" type="text/javascript"></script>
<script src="nogray_core_vs1_min.js" type="text/javascript"></script>
<script src="nogray_color_picker_vs2_min.js" type="text/javascript"></script>
<script language="javascript">
window.addEvent('domready', function(){
var color1 = new ColorPicker('Color1', 'Color1_div');
var color2 = new ColorPicker('Color_a', 'Color_a_div', {onComplete: function(){
alert(this.color);
}
});
var color3 = new ColorPicker('Color2', 'Color2_div', {color:'#0000FF'});
var color4 = new ColorPicker('Color3');
var color5 = new ColorPicker('Color4', 'Color4'); });
</script>
<style> * {font-family:Arial, Helvetica, sans-serif;
font-size:9pt;} .sample_swatch {float:left;
width:20px;
height:20px;
cursor:pointer;}
/* table list */
.table_list {border-collapse:collapse;
border:solid #cccccc 1px;
width:100%;}
.table_list td {padding:5px;
border:solid #efefef 1px;}
.table_list th {background:#75b2d1;
padding:5px;
color:#ffffff;}
.table_list tr.odd {background:#e1eff5;}
</style>
</head>
<body>
<center>
<!-- Begin: AdBrite --><script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'FFFFFF';
</script>
<span style="white-space:nowrap;">
<script src="
http://ads.adbrite.com/mb/text_group.php?sid=473706&zs=3732385f3930" type="text/javascript"></script>
<!---->
<a target="_top" href="
http://www.adbrite.com/mb/commerce/purchase_form.php?opid=473706&afsid=1"><img src="
http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#FFFFFF" alt="Your Ad Here" width="14" height="90" border="0" /></a>
</span>
<!-- End: AdBrite -->
</center>
<br /><br />
<h1>The NoGray JavaScript Color Picker:</h1>
This file contains a few examples to help you start using the color picker, for the latest version please visit
<a href="
http://www.nogray.com">The NoGray.com</a>
<br /><br />
<a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=admin%40nogray%2ecom&item_name=NoGray%20Donation&buyer_credit_promo_code=&buyer_credit_product_category=&buyer_credit_shipping_method=&buyer_credit_user_address_change=&no_shipping=1&return=http%3a%2f%2fwww%2enogray%2ecom%2f&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank">we thrive on your donations</a>
<br /><br />
<b>Requirements:
</b><br /
>The color picker requires an XHTML doctype, which means your <html> tag should look like<pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br /><html xmlns="
http://www.w3.org/1999/xhtml"></pre><br /><b>Try It:</b><br /><br /><b>Default Color Value (Red):
</b><br />
<div id="Color1_div" class="sample_swatch" style="background:#ff0000;"> </div><input type="text" size="6" id="Color1" />
<br /><br />
<b>Alert the value when done:
</b><br />
<div id="Color_a_div" class="sample_swatch" style="background:#ff0000;"> </div><input type="text" size="6" id="Color_a" />
<br /><br />
<b>Start With Blue</b>
<br /><
div id="Color2_div" class="sample_swatch" style="background:#0000ff;"> </div><input type="text" size="6" id="Color2" />
<br /><br />
<b>No Swatch:</b><br />
<input type="text" size="6" id="Color3" />
<br /><br />
<b>Swatch and input field are the same:</b>
<br />
<input type="text" size="6" id="Color4" />
<br /><br />
<b>Configurations:</b>
<br /><br />
You can customized the look and feel of the color picker by changing the color_picker_interface.html from the color_picker_files folder. Also, there are some configuration options you can set when initiating the color picker by passing an options object.
<br /><br />
Options objects are a key: value object with the following syntax<pre>{option: value,option: {option: value, option: value},option: [value1, value2]}</pre><table class="table_list">
<tr>
<th>Option</th>
<th>Description</th>
<th>Default Value</th>
</tr>
<tr>
<td>
<strong>color</strong>
</td>
<td>The initial color for the Color Picker. This property can be accessed by this.color or this.options.color
</td>
<td>#FF0000 (Red)</td>
</tr>
<tr>
<td colspan="3">
Example:
<pre>var color_picker = new ColorPicker('myElement', 'Swatch', {color:'#0000FF'});</pre>
</td>
</tr>
<tr class="odd">
<td><strong>openOnClick</strong></td>
<td>Boolean value to open the Color Picker when the user click on the swatch or the input field or not.
<br /> If set to false, you can use the <strong>showPicker</strong> function to open the color picker</td>
<td>true</td>
</tr>
<tr class="odd">
<td colspan="3">Example:
<pre>var color_picker = new ColorPicker('myElement', 'Swatch', {openOnClick:false});color_picker.showPicker(); // will open the color picker manually</pre></td>
</tr>
<tr>
<td><strong>colorPickerInterface</strong></td>
<td>The path for the color picker interface file.</td>
<td>'color_picker_files/color_picker_interface.html'</td>
</tr>
<tr>
<td colspan="3">
Example:
<pre>var color_picker = new ColorPicker('myElement', 'Swatch', {colorPickerInterface:'my_file_path.html'});</pre>
</td>
</tr>
<tr class="odd">
<td><strong>onPreview</strong></td>
<td>Event that will be fired everytime the color change on the color picker.</td>
<td>Changing the input value and the swatch background color.</td>
</tr> <tr class="odd">
<td colspan="3">
Example:
<pre>var color_picker = new ColorPicker('myElement', 'Swatch', {onPreview: function(color){
if ($defined(this.swatch)) { this.swatch.setStyle("backgroundColor", color);
if (new Color(color).hsb[2] < 65) var fg_color = "#ffffff";
else var fg_color = "#000000";
this.swatch.setStyle("color", fg_color);
} this.element.value=color; }});</pre>
</td>
</tr>
<tr>
<td><strong>onChange</strong>
</td>
<td>Event that will be fired when the user click the OK button.</td>
<td>Changing the object color (and options.color) values and calling the onPreview event and the onComplete event.</td>
</tr>
<tr>
<td colspan="3">
Example:
<pre>var color_picker = new ColorPicker('myElement', 'Swatch', {onChange: function(color){
this.options.color = this.color = color;
this.fireEvent("onPreview", color);
this.fireEvent("onComplete", color);
}});</pre>
</td>
</tr>
<tr class="odd">
<td><strong>onCancel</strong></td>
<td>Event that will be fired when the user click on the Cancel button.</td>
<td>Calling the onPreview event with the current color value.</td>
</tr>
<tr class="odd">
<td colspan="3">Example:
<pre>var color_picker = new ColorPicker('myElement', 'Swatch', {onCancel: function(color){
this.fireEvent("onPreview", this.options.color);
}});</pre>
</td>
</tr>
<tr>
<td><strong>onComplete</strong></td>
<td>Event that will return the current color. Mainly used for the web developer to run any action when the user select a color.</td>
<td>Returns the color</td>
</tr>
<tr>
<td colspan="3">Example:
<pre>var color_picker = new ColorPicker('myElement', 'Swatch', {onComplete: function(){
return this.color;
}});</pre>
</td>
</tr>
</table>
<br /><br />
<center>
<!-- Begin: AdBrite -->
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'FFFFFF';
</script>
<span style="white-space:nowrap;">
<script src="
http://ads.adbrite.com/mb/text_group.php?sid=473706&zs=3732385f3930" type="text/javascript">
</script>
<!---->
<a target="_top" href="
http://www.adbrite.com/mb/commerce/purchase_form.php?opid=473706&afsid=1"><img src="
http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#FFFFFF" alt="Your Ad Here" width="14" height="90" border="0" /></a>
</span>
<!-- End: AdBrite -->
</center>
</body>
</html>