webForumDet fria alternativet

får inte till det

0 svar · 146 visningar · startad av alfa

alfaMedlem sedan juni 2000202 inlägg
#1

hur ska jag göra för att få till en knapp som jag trycker på och då ska han skriva ut
<BR>

Ni kan se hur dom andra funkar.
Jag får inte till det.

<html>

<style type="text/css">
TABLE#tblCoolbar {
background-color:buttonface; padding:1px; color:menutext;
border-width:1px; border-style:solid;
border-color:threedhighlight threedshadow threedshadow threedhighlight;
}
.cbtn{
BORDER-LEFT: threedface 1px solid;
BORDER-RIGHT: threedface 1px solid;
BORDER-TOP: threedface 1px solid;
BORDER-BOTTOM: threedface 1px solid;
}
.starter{
background-color: buttonface;
border-left: buttonhighlight solid 1px;
border-right: buttonshadow solid 1px;
border-top: buttonhighlight solid 1px;
font-size: 1px;
top: 1px;
height: 22px;
width: 3px;
}
.separator{
border-left: buttonshadow solid 1px;
border-right: buttonhighlight solid 1px;
font-size: 0px;
top: 1px;
height: 22px;
width: 1px;
}
.dropdown{
height: 22px;
top:2;
font:8pt verdana,arial,sans-serif
}
.arrow {cursor:default;}
</style>

<script LANGUAGE="JavaScript">

var ground = "";

function changeColor(wcolour) {

if (ground=="bg"){
document.all["pickbgcolour"].style.backgroundColor = '#' + wcolour;
document.all["colorbox"].style.visibility = 'hidden';
idContent.document.body.bgColor = wcolour;
} else {
document.all["pickfgcolour"].style.backgroundColor = '#' + wcolour;
document.all["colorbox"].style.visibility = 'hidden';
cmdExec("ForeColor",wcolour);
}
}

function showColor(posX,posY,what){
e = window.event;
with (document.all["colorbox"]){
style.left = e.clientX+4;
style.top = e.clientY-18;
style.visibility = 'visible';
}
ground = what;
}

function button_over(eButton){
eButton.style.borderBottom = "buttonshadow solid 1px";
eButton.style.borderLeft = "buttonhighlight solid 1px";
eButton.style.borderRight = "buttonshadow solid 1px";
eButton.style.borderTop = "buttonhighlight solid 1px";
}
function button_out(eButton){
eButton.style.borderColor = "threedface";
}
function button_down(eButton){
eButton.style.borderBottom = "buttonhighlight solid 1px";
eButton.style.borderLeft = "buttonshadow solid 1px";
eButton.style.borderRight = "buttonhighlight solid 1px";
eButton.style.borderTop = "buttonshadow solid 1px";
}
function button_up(eButton){
eButton.style.borderBottom = "buttonshadow solid 1px";
eButton.style.borderLeft = "buttonhighlight solid 1px";
eButton.style.borderRight = "buttonshadow solid 1px";
eButton.style.borderTop = "buttonhighlight solid 1px";
eButton = null;
}

var isHTMLMode=false

function document.onreadystatechange(){
idContent.document.designMode="On"
}
function cmdExec(cmd,opt) {
if (isHTMLMode){alert("Please uncheck 'Edit HTML'");return;}
idContent.document.execCommand(cmd,"",opt);idContent.focus();
}
function setMode(bMode){
var sTmp;
isHTMLMode = bMode;
if (isHTMLMode){sTmp=idContent.document.body.innerHTML;idContent.document.body.innerText=sTmp;}
else {sTmp=idContent.document.body.innerText;idContent.document.body.innerHTML=sTmp;}
idContent.focus();
}
function createLink(){
if (isHTMLMode){alert("Please uncheck 'Edit HTML'");return;}
cmdExec("CreateLink");
}

function fninit()
{
for(i=0;i<document.all.length;i++) document.all(i).unselectable = "on";

Form1.txtTitle.unselectable = "off";
idContent.unselectable = "off";
}

function Save()
{
if (isHTMLMode){alert("Please uncheck 'Edit HTML'");return;}
Form1.txtContent.value = idContent.document.body.innerHTML;
if (Form1.txtContent.value.length > 4000)
{
alert("Document Content too long");
return ;
}
if (Form1.txtTitle.value == "")
{
alert("Please fill the document Title.");
return ;
}
Form1.submit();
}
</script>

<body onload="fninit();" style="FONT-FAMILY: Verdana;FONT-SIZE: x-small;">

<!-- CONTENT EDITOR START -->
<table id="tblCoolbar" cellpadding="0" cellspacing="0" width="500">
<tr>
<td><div class="starter"></div></td>
<td><div class="cbtn" onClick="cmdExec('copy')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);"><img align="absmiddle" src="images/Copy.gif" alt="Copy" WIDTH="23" HEIGHT="22"></div></td>
<td><div class="separator"></div></td>
<td><div class="cbtn" onClick="cmdExec('justifyleft')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);"><img align="absmiddle" src="images/Left.gif" alt="Justify Left" WIDTH="23" HEIGHT="22"></div></td>
<td><div class="separator"></div></td>
<td><div class="cbtn" onClick="cmdExec('insertorderedlist')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);"><img align="absmiddle" src="images/numlist.GIF" alt="Ordered List" WIDTH="23" HEIGHT="22"></div></td>
<td><div class="cbtn" onClick="cmdExec('indent')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);"><img align="absmiddle" src="images/inindent.gif" alt="Increase Indent" WIDTH="23" HEIGHT="22"></div></td>
<td><div class="separator"></div></td>
<td><div class="cbtn" onClick="cmdExec('createLink')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);"><img align="absmiddle" src="images/Link.gif" alt="Link" WIDTH="23" HEIGHT="22"></div></td>
<td><div class="cbtn" onClick="cmdExec('InsertHorizontalRule')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);"><img align="absmiddle" src="images/hr.gif" alt="Horizontal Rule" WIDTH="22" HEIGHT="22"></div></td>
<td><div class="separator"></div></td>

<td>
<div class="cbtn" id="pickfgcolour"
style="background-color:#FFFFFF;width:16;height:17;"
onmouseover="button_over(this);"
onmouseout="button_out(this);"
onmousedown="button_down(this);"
onmouseup="button_up(this);">
<a class="arrow" href="#" onClick="showColor(this.x,this.y,'fg');">
<img align="absmiddle" src="images/fgcolor.gif" alt="Forecolor" border="0" WIDTH="23" HEIGHT="22">
</a></div>
<!-- --Colour drop down box-- -->

\<div id="colorbox" style="position:absolute;visibility:hidden"\>
	\<table border="0" cellpadding="0" cellspacing="0" width="252" bgcolor="#000000"\>
	\<tr\>
	\<td\>     
			\<table border="0" bordercolor="#000000" cellpadding="0" cellspacing="1"\>
			\<tbody\>
			\<tr\>
			\<script language="JavaScript"\>
			c = new Array();								
			c\[1\] = "FF";				
			c\[2\] = "CC";				
			c\[3\] = "99";				
			c\[4\] = "66";				
			c\[5\] = "33";				
			c\[6\] = "00";				
			d = 0;								
			for (i=1;i \<=6;i++)
				{					
				if (i \>1)
					{					
					document.write( "\</tr\>\\n\<tr\>\\n");					
					}					
				for (m=1;m \<=6;m++)
					{								
					for (n=1;n \<=6;n++)
						{								
						d++;							
						colour = c \+ c\[m\] + c\[n\];	
								 
						document.write("\<td bgcolor=\\"#"+colour+"\\" width=7 class=\\"text\\"\>\<a href=\\"#\\" onClick=\\"changeColor('"+colour+"')\\"\>\<img src=\\"images/pixel.gif\\" width=7 height=7 name=\\"a"+d+"\\" border=0\>\</td\>\\n");
						}					
					}				
				}	
			\</script\>        
			\</tr\>        
			\</tbody\>       
			\</table\>
	\</td\>
	\</tr\>
	\</table\>
\</div\>	

</td>
<!--
<td width="100%">
<div class="cbtn" id="pickbgcolour"
style="background-color:#FFFFFF;width:16;height:17;"
onmouseover="button_over(this);"
onmouseout="button_out(this);"
onmousedown="button_down(this);"
onmouseup="button_up(this);">
<a class="arrow" href="#" onClick="showColor(this.x,this.y,'bg');">
<img src="images/bgcolor.gif" name="colorimage" border="0" alt="Background Color" WIDTH="23" HEIGHT="22">
</a></div>
</td>
-->
<td><div class="separator"></div></td>
<td><div class="cbtn" style="font:8pt verdana,arial,sans-serif;cursor:hand" valign="middle"
onclick="window.open('admin_ImageList.asp','NewWindow','scrollbars,width=450,height=400')"
onmouseover="button_over(this);"
onmouseout="button_out(this);"
onmousedown="button_down(this);"
onmouseup="button_up(this);">Insert Image</div></td>

</tr>
</table>

<table id="tblCoolbar" cellpadding="0" cellspacing="0" width="500">
<tr valign="middle" height="25">
<td><div class="starter"></div></td>
<td><select class="dropdown" onchange="cmdExec('fontsize',this[this.selectedIndex].value);" id=select3 name=select3>
<option selected>Size</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="10">10</option>
<option value="12">12</option>
<option value="14">14</option>
</select></td>
<td><div class="separator"></div></td>
<td><div class="cbtn" onClick="cmdExec('underline')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);"><img align="absmiddle" src="images/Under.gif" alt="Underline" WIDTH="23" HEIGHT="22"></div></td>
<td><div class="separator"></div></td>

</tr>
</table>

<iframe width="500" id="idContent" height="350"></iframe>
<!-- CONTENT EDITOR END -->

</body>

</html>

130 ms totalt · 3 externa anrop · v20260731065814-full.fb544a5a
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
127 ms — hämta tråd, inlägg och bilagor (db)