jquery - click image list form mysql show div and hide other all image -


i have issue ask help.

i have issue ask help.

i have image list mysql (img1, img2, ... imgn) want click on each image, show corresponding div img, others hide div tag .

table 1: id title active icon

data: 1 paypal 1 pp.png

table 2: id username account type status

data: 1 admin paypal@mail.com 1 1

img number of pages in record of table 2. contents of div tag table 2 on

$sql=$db1->query("select * withdraw_options active='1' order id asc");              while($temp=$db1->fetch_array($sql)) {                  $sqlacc = $db1->query("select * payout_accounts username='$username' , type='$temp[id]' order id asc");                  if($db1->num_rows() != 0) {                     $reacc = $db1->fetch_array($sqlacc);                     $reacc_id = $reacc[id];                     $reacc_user = $reacc[username];                       //filter , remove temp[id]                     $rvdiv = $db1->query("select * payout_accounts username='$username' , id not in ('$reacc_id')");                     while ($rem=$db1->fetch_array($rvdiv)) {                          $remid = $rem['id'];                      }                       $wdo1.="                     <script type='text/javascript'>                             window.showdiv$reacc[id] = function(fwd$reacc[id]) {                                  var disp$remid = document.getelementbyid(fwd$remid);                                  var disp$reacc[id] = document.getelementbyid(fwd$reacc[id]);                                    if(disp$reacc[id].style.display == \"none\") {                                       disp$reacc[id].style.display = \"\";                                     disp$remid.style.display = \"none\";                                  }                             };                         </script>                      <div style='float:left;'><a onclick=\"showdiv$reacc[id]('fwd$reacc[id]'); return false;\" href='#'><img width=105 height=64 src=\"images/payments/".$temp[icon]."\" border=\"0\" title=\"we accept payment through ".$temp['title']."!\"></a></div>                     ";                     $wdo2.="                     <form action=\"index.php?view=account&ac=profile&action=withdraw&".$url_variables."\" method=\"post\" name=\"form\" onsubmit=\"return dosub(this)\">                         <div style=\"display: none;\" id=\"fwd".$reacc[id]."\">                         <input type=\"hidden\" name=\"accounttype\" value=\"$temp[id]\">                         <table width=\"100%\" class=\"tablestyle withdraw\">                             <tr>                                 <th>payment address / account #:</th>                                 <td><input readonly type=\"text\" name=\"account\" value='$reacc[account]'>                                  <a href=\"index.php?view=paymentupdate&".$url_variables."\">$pa_status</a></td>                             <tr>                                 <tr>                                 <th>gross withdraw: </th>                                 <td>$settings[currency]<input type=\"text\" name=\"amount\" size=4  value=\"".(floor($thismemberinfo[balance]*100)/100)."\" onkeyup='calculate()' onchange='calculate2()'></td>                             </tr>                             <tr>                                 <th>fee: </th>                                 <td>                                     <span id=\"feeout\"></span> or <span id=\"feeminout\"></span>                                  </td>                             </tr>                             <tr>                                 <th>net withdraw: </th>                                 <td>$settings[currency]<input type=\"text\" name=\"net\" size=4 onkeyup='calculate()'></td>                             </tr>                                 <tr>                                 <th>personal pin:</th>                                 <td><input type=\"text\" name=\"personal_pin\"></td>                             </tr>                                 <tr>                                 <td colspan=2 align=\"center\"><input type=\"submit\" value=\"request\"></td>                             </tr>                         </table>                         </div>                         <div style=\"display: none;\" id=\"warn\">                             <b style=\"color: red\">you not have enough earnings request payment method!</b>                         </div>                     </form>";                   }             } 

javascript:

<script type='text/javascript'> window.showdiv$reacc[id] = function(fwd$reacc[id]) {  var disp$remid = document.getelementbyid(fwd$remid);  var disp$reacc[id] = document.getelementbyid(fwd$reacc[id]);    if(disp$reacc[id].style.display == \"none\") {   disp$reacc[id].style.display = \"\"; disp$remid.style.display = \"none\";  } }; </script> 

html:

<center>                 $wdo1                 $wdo2             </center>"; 

this code when click on img1 show form 1 when click on img2 show form 2 form not hide. want form 1 hide

thanks


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -