Toon posts:

[javascript] Select box verbergen tussen 2 layers

Pagina: 1
Acties:

Verwijderd

Topicstarter
Zouden jullie misschien eens kunnen kijken naar:
http://www.webfreak.nl/catalogus.prod.php ?

Het probleem hier is dat als je van 'Add product' naar 'Edit product' gaat dat de <select> boxen van de layer 'Add product' blijven staan in de layer 'Edit boxen', het vreemde ook is dat voor de rest alles van 'Add product', dus de <input type=text> velden wel verdwijnen als je switcht van layer.

Weet iemand hoe ik dat kan fixen ? Ik ben er nu al een week mee aan het kloten namelijk |:(

  • Clay
  • Registratie: Oktober 1999
  • Laatst online: 22-06 13:51

Clay

cookie erbij?

dat is standaard, een select kan je nergens onder krijgen (behalve een frame), dus die layer ff hiden en klaro.

Instagram | Flickr | "Let my music become battle cries" - Frédéric Chopin


Verwijderd

Topicstarter
'k snap niet precies hoe je dat bedoelt, kan je misschien ff de code aanpassen ? Hier is de gehele code:

<script language="JavaScript">
var defaultValue = ""
function Changes() {
var defaultValue = "changed";
}
ie = document.all?1:0
var c = 1
function hideIt(id) {
if (ie) {
document.all.sId.style.display = 'none';document.all[id].style.zIndex = c--;
document.all[id].style.visibility = "hidden";
document.all['hider'].style.visibility = "visible";
}
}
function showIt(id) {
if (ie) {
document.all[id].style.zIndex = c++;
document.all[id].style.visibility = "visible";
}
else {
document.getElementById(id).style.zIndex = c++;
document.getElementById(id).style.visibility = "visible";
}
}
</script>
<table width=580>
<tr>
<td>
<table cellpadding=2 width="516">
<tr align="left">
<td align="left" valign="top" width="110"> <font class="Wf">
<input onClick="showIt( 'add');return true" type=radio value=0
name="Level">
</font>Add product</td>
<td align="left" valign="top" width="106"><font class="Wf">
<input onClick="showIt( 'edit');return true" type=radio value=25 name="Level">
Edit product</font></td>
<td align="left" width="15">  </td>
<td align="left" valign="top" width="118"><font class="Wf">
<input onClick="showIt( 'delete');return true" type=radio
value=75 name="Level">
Delete product</font> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellpadding=0 cellspacing="0" width=580>
<tr>
<td colspan=3>
<div id="add" style='position: absolute; visibility:
hidden;height:180;width:580;border:1px solid #6699cc; background:#ffffff;'>
<table width="32%" border="0" height="97">
<form method="post" action="catalogus.prod_add2.php" name="form_add">
<tr>
<td width="27%">Title</td>
<td width="73%">
<input type="text" name="title">
</td>
</tr>
<tr>
<td width="27%">Category</td>
<td width="73%">
<select id="sId" name="cat_name" style='background-color : transparent;'>
<option>Select category</option>
</select>
</td>
</tr>
<tr>
<td width="27%">Picture</td>
<td width="73%">
<select name="picture">
<option>Select picture</option>
</select>
</td>
</tr>
<tr>
<td width="27%">Description</td>
<td width="73%">
<input type="text" name="description">
</td>
</tr>
<tr>
<td width="27%">
<input type="submit" name="Submit" value="Add product">
</td>
<td width="73%">  </td>
</tr>
</form>
</table>
</div>
<div id="edit" style='position: absolute; visibility: hidden;
height:180;width:580;
border:1px solid #6699cc; background:#ffffff;'>
<table cellpadding=2 cellspacing=5
width="99%"><tr bgcolor="#FFFFFF"><td><font class="Wf">
Edit product bla bla bla</font></td></tr>
</table></div>
<div id="delete" style='position: absolute; visibility: hidden;
height:180;width:580;
border:1px solid #6699cc; background:#ffffff;'>
<table cellpadding=2 cellspacing=5
width="99%"><tr bgcolor="#FFFFFF"><td><font class="Wf">
Delete product bla bla bla</font></td></tr>
</table></div>
<div id="hider" style='position: static; visibility: visible;height:180;width:580;
border:1px solid #6699cc; background:#ffffff;'> <table cellpadding=2
cellspacing=5 width="99%"><tr bgcolor="#FFFFFF"><td><font class="Wf">
Please make a selection out of the above options
</font></td></tr></table></div>
</td>
</tr>
</table>

TNX :)