Seite 1 von 1
button im Eingabeframe
Verfasst: 21.07.2012, 00:57
von BumBumBass
in der Scriptübersicht gibts ein script um einen Button in den Eingabeframe zu setzen
<script language="javascript">pi=parent.info; pid=pi.document; if(!pi.cell){pi.cell = pid.createElement("td"); pi.link = pid.createElement("a"); pi.link.setAttribute("target", "_blank"); pi.link.setAttribute("href", "URL-ZUR-WEBSITE"); pi.img = pid.createElement("img"); pi.img.setAttribute("src", "URL-ZUR-GRAFIK"); pi.img.style.border=0; pi.link.appendChild(pi.img); pi.cell.appendChild(pi.link); pid.getElementsByTagName("tr")[0].appendChild(pi.cell);}</script>
dieser Button ist nun direkt am Verlassen Button. Wie muss das Script geändert werden um ein Abstand von X-px zu bekommen.
Zusatzinfo falls es für die Umsetzung wichtig ist. Ich benutze das Script welchens zwischen dem Chat und dem Verlassen Button einen Abstand bewirkt
<script type="text/javascript">function buttonAbstand(){if(efIsLoad()){formular=parent.info.document.forms[1].elements;formular[formular.length-1].style.marginLeft="10px"}else{window.setTimeout("buttonAbstand()",50)}}buttonAbstand();</script>
Re: button im Eingabeframe
Verfasst: 25.07.2012, 12:39
von Maxs
Hey!
Probier mal das, das sollte funktionieren:
<script language="javascript">pi=parent.info; pid=pi.document; if(!pi.cell){pi.cell = pid.createElement("td"); pi.link = pid.createElement("a"); pi.link.setAttribute("target", "_blank"); pi.link.setAttribute("href", "URL-ZUR-WEBSEITE"); pi.img = pid.createElement("img"); pi.img.setAttribute("src", "URL-ZUR-GRAFIK"); pi.img.style.border=0; pi.img.style.marginLeft="10px"; pi.link.appendChild(pi.img); pi.cell.appendChild(pi.link); pid.getElementsByTagName("tr")[0].appendChild(pi.cell);}</script>
Bei
10px kannst du den Abstand selbst bestimmen.
Re: button im Eingabeframe
Verfasst: 25.07.2012, 15:35
von BumBumBass
danke maxs, et funzt
Re: button im Eingabeframe
Verfasst: 25.07.2012, 17:27
von BumBumBass
wie schon gesagt es funzt. nun möchte der chatbetreiber auch noch einen paypal spendenbutton neben dem verlassen button.hier mal das script welches von paypal stammt
Re: button im Eingabeframe
Verfasst: 25.07.2012, 18:04
von Maxs
Hier bitte:
<script type="text/javascript">pi=parent.info; pid=pi.document; function ppbutton(){if(efIsLoad()){if(!pi.paypal){pi.paypal=pid.createElement("td");pi.paypal.innerHTML='<form action="
https://www.paypal.com/cgi-bin/webscr" target="_blank" method="post"><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="hosted_button_id" value="P5H9NV67SS5ME"><input type="image" src="
https://www.paypalobjects.com/de_DE/DE/ ... eCC_LG.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal." style="margin-left:
50px;"><img alt="" border="0" src="
https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1"></form>'; pi.paypal.id="paypal"; pid.getElementsByTagName("tr")[0].appendChild(pi.paypal);}}else{window.setTimeout("ppbutton()", 250);}} ppbutton();</script>
Bei
50px kann der Abstand wieder selbst bestimmt werden.

Re: button im Eingabeframe
Verfasst: 25.07.2012, 18:15
von BumBumBass
danke dir nochmal... klappt 1a