Advertisement
Guest User

Untitled

a guest
May 25th, 2012
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("#hdselect").click(function(){
  2.             $(".modal").html("");
  3.            
  4.             $.post('mediaservice.php',{hd:'ok',images:$("#hdimages").val()},function(data){
  5.                 $(".modal").append(data);
  6.             });
  7.             $(".modal").dialog({
  8.                 'modal':true,
  9.                 'title':"Click the image to select",
  10.                 'width':960,
  11.                 'height':600,
  12.                 'resizable':false,
  13.                 'show': {effect: 'drop', direction: "up"},
  14.                 'buttons': {"Ok": function() {  
  15.                         var hd=Array();
  16.                         var hdval=$("#hdimages").val();
  17.                         $("input[name='hd[]']:checked").each(function(){
  18.                             hd.push($(this).val());
  19.                         });
  20.                         if(hdval!=''){
  21.                             hdval=hdval+","+hd;
  22.                         }else{
  23.                             hdval=hd;
  24.                         }                      
  25.                         $("#hdimages").val(hdval);
  26.                         var images=hdval;
  27.                         $.post('mediaservice.php',{getHd:images},function(data){
  28.                             $("#imgthumbBase").append(data);
  29.                         });
  30.                         $(this).dialog("close");
  31.                     }
  32.                 }
  33.             });
  34.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement