Chaos: layer - div Ausgabe ändern

Beitrag lesen

Hi,

Nun probiere ich schon seit 2 Tagen herum und habe irgendwie ein Brett vor dem Kopf.

Ich will auf meiner Homepage eine Comicfigur die eine Sprechblase enthält in der sie dem Besucher eine Frage (Formular mit Radio-Buttons, Input-Felder usw.) stellt und in der sie anschließend auch eine Antwort darauf gibt. Zum Beispiel:"Vielen Dank" o.ä.

Diese Figur wird mittels eines transparenten Layers auf die vorhandene Seite eingebunden. (Aufgerufen wird sie entweder von *.php4-Seiten oder von *.shtml-Seiten mittels include)

Soweit ja alles ganz gut, nur sobald man auf das Submit-Button klickt, verschwindet die aufgerufene Seite. Diese sollte aber erhalten bleiben und sich ja nur der Inhalt der Sprechblase ändern.

Wer weiß Hilfe wie ich das anstellen muß?

Hier ist das Script für die Comicfigur. (Nicht von mir wie man sieht)

<HEAD>
<!-- Popup-Infobox-Anfang ---->
<script language="JavaScript1.2">
//Popup Box- By Jim Silver @ jimsilver47@yahoo.com
//Exlusive permission granted to Dynamic Drive (http://dynamicdrive.com) to include this script in their DHTML archive.
//For full source code, terms of use, and 100's more scripts, visit http://www.dynamicdrive.com

var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all

//drag drop function for NS 4////
/////////////////////////////////

var dragswitch=0
var nsx
var nsy
var nstemp

function drag_dropns(name){
if (!ns4)
return
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}

function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
 if (dragswitch==1){
  temp.moveBy(e.x-nsx,e.y-nsy)
  return false
 }
}

function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}

//drag drop function for ie4+ and NS6////
/////////////////////////////////
function drag_drop(e){
 if (ie4&&dragapproved){
  crossobj.style.left=tempx+event.clientX-offsetx
  crossobj.style.top=tempy+event.clientY-offsety
  return false
 }
  else if (ns6&&dragapproved){
  crossobj.style.left=tempx+e.clientX-offsetx
  crossobj.style.top=tempy+e.clientY-offsety
  return false
 }
}

function initializedrag(e){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage

var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "HTML" : "BODY"

while (firedobj.tagName!=topelement&&firedobj.id!="dragbar"){
 firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}

if (firedobj.id=="dragbar"){
 offsetx=ie4? event.clientX : e.clientX
 offsety=ie4? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
 tempy=parseInt(crossobj.style.top)

dragapproved=true
 document.onmousemove=drag_drop
 }
}

document.onmousedown=initializedrag
 document.onmouseup=new Function("dragapproved=false")

////drag drop functions end here//////
function hidebox(){
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
document.showimage.visibility="hide"
}
</script>
<!-- Popup-Infobox-Ende ---->

</HEAD>

<BODY BGCOLOR="#7fb0ff" LINK="#ff8000" ALINK="#ff8000" VLINK="#ff8000">

<!-- Popup-Infobox-Anfang ---->
<div id="showimage" style="position:absolute;width:100px;left:480;top:100">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
  <TR>
    <TD VALIGN="BOTTOM"><DIV id="dragbar" style="cursor:hand"><ilayer width="100%" onSelectStart="return false"><layer width="100%" onMouseover="dragswitch=1;if (ns4) drag_dropns(showimage)" onMouseout="dragswitch=0"><IMG SRC="sophia.gif" TITLE="Ich bin Sofia ;)" ALT="Ich bin Sophia ;)" WIDTH="50" HEIGHT="77" ALIGN="BOTTOM" BORDER="0" NATURALSIZEFLAG="3"></layer></ilayer></TD>
    <TD>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<tr>
<td><img SRC="alo.gif" height=10 width=10></td>
<td><img SRC="oben.gif" height=10 width=250></td>
<td><img SRC="aro.gif" height=10 width=10></td>
</tr>
<tr>
<td BACKGROUND="seite.gif"> </td>
<td BACKGROUND="oben.gif"><FONT FACE="ARIAL" SIZE="-2">

HIER KOMMT DIE FRAGE HIN, BZW NACH SUBMIT DIE ANTWORT! (Aber ohne die aufgerufene Seite zu verändern.)

</TD>
<td BACKGROUND="seite.gif"> </td>
</tr>
<tr>
<td><img SRC="alu.gif" height=10 width=10></td>
<td><img SRC="oben.gif" height=10 width=250></td>
<td><img SRC="aru.gif" height=10 width=10></td>
</tr>
</table>
</TD>
  </TR>
</TABLE>
</div>
<!-- Popup-Infobox-Ende ---->