Solved

asp close window called from a top or main window

Posted on 2014-07-30
70
189 Views
Last Modified: 2014-08-04
I have a table 5 rows and ncolumns I can click an a cell taht will open a new window over the table with a form and an action.

I need that when the submiy is pressed the action takes place and the wondow cloed reloading the table url

Any ideas?
0
Comment
Question by:robrodp
  • 41
  • 24
  • 4
  • +1
70 Comments
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 50 total points
Comment Utility
reloading the table url

Open in new window


the table url? or table content ?

table url?
close: function() {
      window.location.reload();
}

table refresh :
close: function() {
     $("#tableIDContainer").load(location.href + " #tableID"); // this is jQuery, add Jquery plugin to your page
}

With (for reference) :

<div id="tableIDContainter">
   <table id="tableID">
...
  </table>
</div>

Open in new window

0
 
LVL 32

Assisted Solution

by:Big Monty
Big Monty earned 50 total points
Comment Utility
when opening the child window, you need to assign it a variable, then from within the submit function, you would reference that variable:

$(document).ready(function () {
      var win;

      $('#parentButtonIDThatOpensChildWindow').click(function() {
          win = window.open("child.asp", "something", "width=550,height=170");
      });
});

Open in new window


and in your submit function on the child window:

function closeWin() {
   window.parent.location.reload()
    win.close();
}

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
I have this code:


My table applears as rows and colums. Each row has ha cel with a form that calls an asp script in a popup window


The asp script is:

<form action="action.asp">

<input......

<input type="submit>

<%save data
%>

After it saves the data I need to close the popuo window and reload the table since the form in the popuo modifues the data of the table.

Where do I put the code?
0
 
LVL 32

Expert Comment

by:Big Monty
Comment Utility
you'll need to do the closing of the child window on page load, assuming you have the child window posting to itself (if you don't, the only way to d0 would be via ajax), I suggest setting a flag when you submit your form, for example, add mode=close to your action:

<form action="action.asp?mode=close">

then, after you run saveData, have the child window load as normal, then during page load, close and refresh with the code I originally posted. if you don't want to use jquery, you can do something like this:

<script language="text/javascript">
function closeWin() {
   window.parent.location.reload()
    win.close();
}
</script>

Open in new window


and on your body tag, check for the flag and call the function if it exists:

<body <%if Request.QueryString("mode") = "close" then %>onload="closeWin()" <%end if%> >

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
I set up this function:

<script language="text/javascript">
      function closeWin() {
   window.parent.location.reload()
    win.close();
}

and thebodu tag as:

<body onload="closeWin()">

sn't.To check if the closeWin() will close the window (without dowin anything) but it does't. Any idea what I amdoing wrong?
0
 
LVL 32

Expert Comment

by:Big Monty
Comment Utility
how are you opening the window on the parent page? can you post that code?
0
 

Author Comment

by:robrodp
Comment Utility
I can NP

<a href="editar.asp?id=<%=PanelSet("id")%>" target="popup" onClick="window.open(this.href, this.target, 'alwaysRaised=yes,width=450,height=400,scrollbars=0,toolbar=0'); return false;"><%=PanelSet("id")%></a>

That is the way I open the child asp code from the cell in the table.
0
 
LVL 32

Expert Comment

by:Big Monty
Comment Utility
try this. if it doesn't work, let me know and I'll get something together on my test server when I get home:

<a href="editar.asp?id=<%=PanelSet("id")%>" target="popup" onClick="var win = window.open(this.href, this.target, 'alwaysRaised=yes,width=450,height=400,scrollbars=0,toolbar=0'); return false;"><%=PanelSet("id")%></a>
0
 

Author Comment

by:robrodp
Comment Utility
Will do as soon as I finish my meeting.

Thx
0
 

Author Comment

by:robrodp
Comment Utility
It does the same thing,,,

try the link live,,,

http://parquevehicular.com/panel/panelx.asp

The issue is when you click on the id numbers at the left. It brings up and edit sript that saves new values.

Wehn sent it is suppposed to close thewindow and reload the table so it reflects the changes.
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 400 total points
Comment Utility
Maybe it is just your sample code, but what you have is a little off.
<head>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
    $('#myform').submit(function() {
        window.open('', 'formpopup', 'width=400,height=400,resizeable,scrollbars');
        this.target = 'formpopup';
    });
});
</script>
</head>
	
<style type="text/css">  
body, p, td {
        font-family: Verdana, Serif;
        font-size: 10pt;
        color: black;
        font-weight: normal;
        
    }

</style>
<script type="text/javascript" src="..js/jquery.js"></script>
<center>

Open in new window

Your template should look more like this
<!DOCTYPE html>
<html>
<head>
  <!-- load your external css below -->
  
  <!-- load your js libraries like jquery -->
  
  
  <!-- place your < script >jquery stuff < / script> last -->
  
  <meta charset="utf-8">
  <title>Your Title</title>
</head>
<body>

</body>
</html>

Open in new window

This means that your page should start like this
<!DOCTYPE html>
<html>
<head>
  <!-- load your external css below -->
  <style type="text/css">  
body, p, td {
        font-family: Verdana, Serif;
        font-size: 10pt;
        color: black;
        font-weight: normal;
        
    }

</style>

  <!-- load your js libraries like jquery -->
  <script type="text/javascript" src="..js/jquery.js"></script>

  
  <!-- place your < script >jquery stuff < / script> last -->
  <script language="javascript" type="text/javascript">
$(document).ready(function() {
    $('#myform').submit(function() {
        window.open('', 'formpopup', 'width=400,height=400,resizeable,scrollbars');
        this.target = 'formpopup';
    });
});
</script>

  <meta charset="utf-8">
  <title>Your Title</title>
</head>
<body>

</body>
</html>

Open in new window


I would suggest abandoning what you are doing for a pop up anyway.  This is old school and you can do the same thing with a modal.  There are pure js modals or you can use jquery ui dialogue.  http://jqueryui.com/dialog/

The nice thing about a modal is it gives the visual representation of a pop up, but it is really part of the page.  It starts out hidden until called.  

I made a quick demo here http://jsbin.com/jejiz/1/edit   See my comments for how this works.  If you rather pursue this then the older style pop up, just say so.
<!DOCTYPE html>
<html>
<head>
<link href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />

<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<script>
$(function() {
  
    $( "#dialog-form" ).dialog({
      modal: true,
      autoOpen: false, 
      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });
  
  $('a.openmodal').on('click',function(){// open the modal by clicking an a tag with class openmodal
    var theID = $(this).text();//set the value of the modal
    $('#dialog-form input[name="id"]').val(theID);//Set the value of the input  named ID to the value of the ID we clicked. 
    $('#dialog-form' ).dialog('open'); // now open the modal
    
  });
  
  
  });
  </script>
  
  <meta charset="utf-8">
  <title>Your Title</title>
</head>
<body>
<table id="MyTable" border="0" align="center" cols=9>
  	<tr><td colspan=9 align="center">Filtro con 15 resultados. <br>	</td>
  		</tr>

  
    <tr>
      <td width=5  align="center">Id</td>
      <td width=100  align="center">Empresa</td>
      <td width=100  align="center">Contacto</td>
      <td width=100 align="center">Usuario</td>
      <td  width=10 align="center">Contraseña</td>
      <td  align="center">Logs</td>
      <td  align="center">Ultimo Login</td>
      <td align="center">Validar</td>

      
    </tr>
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >7</a>      
     </td>
       
       <td>eex</td>
       <td>ee</td>
       <td>roberto@pceditores.com</td>
       <td>cajecw</td>
       <td align="right">1</td>
       <td>29/07/2014 03:06:30 p.m.</td>
       <td align="center">
       <form method="get" name="valida7" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=7>
        <input type=hidden name=valx value="no">
        
       <input type="checkbox" onchange="document.valida7.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  
        <tr bgcolor="#DADADD">      
  
       <td>    
      <a class="openmodal" href="#">15</a>      
     </td>
       
       <td>empresita</td>
       <td>Pepe</td>
       <td>robrodp@gmail.com</td>
       <td>hwpasf</td>
       <td align="right">8</td>
       <td>29/07/2014 02:46:49 p.m.</td>
       <td align="center">
       <form method="get" name="valida15" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=15>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida15.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#">10</a>      
     </td>
       
       <td>emprezz</td>
       <td>Memo</td>
       <td>memo@noerapenal.com</td>
       <td>nvunae</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida10" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=10>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida10.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  

     
       
  
     

     
       
  
<tr>
  <td>
        <a href="panelx.asp?filtrar=&pag=ant&mostrar=true&orden=">Anterior</a>
  </td>
    <td>
    <a href="panelx.asp?filtrar=&pag=sig&mostrar=true&orden=">Siguiente</a>
  </td>
  <td>
        <a href="panelx.asp?filtrar=&pag=pri&mostrar=true&orden=">Primera</a>
  </td>
    <td>
    <a href="panelx.asp?filtrar=&pag=ult&mostrar=true&orden=">Ultima</a>
  </td>
</tr>
<tr>
  <td colspan="4" align="center">
        1 de 2  
  </td>
</tr>

</table>
<div id="dialog-form" title="Create new user">
  <p class="validateTips">All form fields are required.</p>
 
  <form>
    <fieldset>
      <label>ID<label>
        <input name="id">
      <label for="name">Name</label>
      <input type="text" name="name" id="name" value="Jane Smith" class="text ui-widget-content ui-corner-all">
      <label for="email">Email</label>
      <input type="text" name="email" id="email" value="jane@smith.com" class="text ui-widget-content ui-corner-all">
      <label for="password">Password</label>
      <input type="password" name="password" id="password" value="xxxxxxx" class="text ui-widget-content ui-corner-all">
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>
</div>
</body>
</html>

Open in new window

0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
I forgot to add, that when you use the modal/dialogue, you will simply use your request.form code on the same page as if the form was always visible.

If this is one of your first js/jquery forms, it can be a little confusing at first.  As asp developers, we are used to using multiple forms as you have done.  In the sample I used, there is just one form and we are using jquery to fill in the form fields.
0
 

Author Comment

by:robrodp
Comment Utility
I am getting there thx...

Where does the asp code to save the form data go?

By the way your comment "As asp developers, we are used to using multiple forms as you have done" is absolutely right. I was just wondering if it was possible to do it in one script which you have done perfectly.

I need to work on it but I will get there.

I dont know where the action for the form goes to save the data,,,
0
 

Author Comment

by:robrodp
Comment Utility
When the openmodal opens I need

sql="SELECT * FROM login where id=" & id

To populate the dfata of the form. I cant figure out where the id is (from the selected row)
0
 

Author Comment

by:robrodp
Comment Utility
When I submit the form and save the data, how does it reload itself to show the updated table ?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
There are a couple of ways to do this.  What information do you need from that query? and is that data already in the table?
0
 

Author Comment

by:robrodp
Comment Utility
Hi

The sql query is the data from the table.

So I am sort of stuck here:

Passing the id from the javascipt code to the asp that brings the data

Using jquery to set the action in the form when submitted

running the asp sction script,
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
>Where does the asp code to save the form data go?
I typically place the modal code towards the bottom of the page and that is where the form will go.  The data capture script goes at the top of your page just as you have always done.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
What data needs to go to the form?
0
 

Author Comment

by:robrodp
Comment Utility
I have dome this:


<form>
  	
    <fieldset>
   <%Set PanelSet = Server.CreateObject("ADODB.RecordSet")
   sql="SELECT * FROM login where id=7" 
  PanelSet.Open sql, cn%>
      <label>ID<label>
      <input disabled name="id">
      <label for="empresa">Empresa</label>
      <input type="text" name="empresa" id="empresa" value="<%=PanelSet("empresa")%>" class="text ui-widget-content ui-corner-all">
      <label for="ina">Socio Ina</label>
      <input type="checkbox" checked name="socio" id="<%=PanelSet("ina")%>"  class="text ui-widget-content ui-corner-all">
      <label for="contacto">Contacto</label>
      <input type="text" name="contacto" id="contacto" value="<%=PanelSet("contacto")%>" class="text ui-widget-content ui-corner-all">
      <label for="lada">Lada</label>
      <input type="text" name="lada" id="lada" value="<%=PanelSet("lada")%>" class="text ui-widget-content ui-corner-all">
      <label for="telefono">Telefono</label>
      <input type="text" name="telefono" id="telefono" value="<%=PanelSet("telefono")%>" class="text ui-widget-content ui-corner-all">
      <label for="celular">Celular</label>
      <input type="checkbox" checked name="celular" id="celular"  class="text ui-widget-content ui-corner-all">
     <label for="email">email</label>
      <input type="text" name="email" disabled id="email" value="<%=PanelSet("usuario")%>" class="text ui-widget-content ui-corner-all">
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
As yiu cansee I have set id=7 since I cant seem to find where the id is,The data is taken from the login table and is inthe PanelSet record set
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Ok, no need to run the query again.  Here I am taking the data from the table  http://jsbin.com/jejiz/3/edit but there are some fields we need to grab that are not in the table.  Next post I will update with how to do that.  Play with the jsbin I created and click on the id and you can see it in action.

<!DOCTYPE html>
<html>
<head>
<link href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />

<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<script>
$(function() {
  
    $( "#dialog-form" ).dialog({
      modal: true,
      autoOpen: false, 
      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });
  
  $('a.openmodal').on('click',function(){// open the modal by clicking an a tag with class openmodal
    var theID = $(this).text();//set the value of the modal
    var Empresa =$(this).closest('tr').find('td:eq(1)').text();
    var Contacto  =$(this).closest('tr').find('td:eq(2)').text();
    var Usuario  =$(this).closest('tr').find('td:eq(3)').text();
    var Contrasena  =$(this).closest('tr').find('td:eq(4)').text();
    var logs  =$(this).closest('tr').find('td:eq(5)').text();
    var login  =$(this).closest('tr').find('td:eq(6)').text();
    
    $('#dialog-form input[name="id"]').val(theID);//Set the value of the input  named ID to the value of the ID we clicked. 
    
    $('#dialog-form input[name="empresa"]').val(Empresa);//Set the value of the input  named ID to the value of the ID we clicked. 
    
     $('#dialog-form input[name="email"]').val(Usuario);//Set the value of the input  named ID to the value of the ID we clicked. 
    
    
    //socio; lada;telefono;celular
    
    
    $('#dialog-form' ).dialog('open'); // now open the modal
    
  });
  
  
  });
  </script>
  
  <meta charset="utf-8">
  <title>Your Title</title>
</head>
<body>
<table id="MyTable" border="0" align="center" cols=9>
  	<tr><td colspan=9 align="center">Filtro con 15 resultados. <br>	</td>
  		</tr>

  
    <tr>
      <td width=5  align="center">Id</td>
      <td width=100  align="center">Empresa</td>
      <td width=100  align="center">Contacto</td>
      <td width=100 align="center">Usuario</td>
      <td  width=10 align="center">Contraseña</td>
      <td  align="center">Logs</td>
      <td  align="center">Ultimo Login</td>
      <td align="center">Validar</td>

      
    </tr>
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >7</a>      
     </td>
       
       <td>eex</td>
       <td>ee</td>
       <td>roberto@pceditores.com</td>
       <td>cajecw</td>
       <td align="right">1</td>
       <td>29/07/2014 03:06:30 p.m.</td>
       <td align="center">
       <form method="get" name="valida7" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=7>
        <input type=hidden name=valx value="no">
        
       <input type="checkbox" onchange="document.valida7.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  
        <tr bgcolor="#DADADD">      
  
       <td>    
      <a class="openmodal" href="#">15</a>      
     </td>
       
       <td>empresita</td>
       <td>Pepe</td>
       <td>robrodp@gmail.com</td>
       <td>hwpasf</td>
       <td align="right">8</td>
       <td>29/07/2014 02:46:49 p.m.</td>
       <td align="center">
       <form method="get" name="valida15" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=15>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida15.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#">10</a>      
     </td>
       
       <td>emprezz</td>
       <td>Memo</td>
       <td>memo@noerapenal.com</td>
       <td>nvunae</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida10" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=10>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida10.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  

     
       
  
     

     
       
  
<tr>
  <td>
        <a href="panelx.asp?filtrar=&pag=ant&mostrar=true&orden=">Anterior</a>
  </td>
    <td>
    <a href="panelx.asp?filtrar=&pag=sig&mostrar=true&orden=">Siguiente</a>
  </td>
  <td>
        <a href="panelx.asp?filtrar=&pag=pri&mostrar=true&orden=">Primera</a>
  </td>
    <td>
    <a href="panelx.asp?filtrar=&pag=ult&mostrar=true&orden=">Ultima</a>
  </td>
</tr>
<tr>
  <td colspan="4" align="center">
        1 de 2  
  </td>
</tr>

</table>
<div id="dialog-form" title="Create new user">
  <p class="validateTips">All form fields are required.</p>
 
  <form>
    <fieldset>
      <label>ID<label>
      <input disabled name="id">
      <label for="empresa">Empresa</label>
      <input type="text" name="empresa" id="empresa"  class="text ui-widget-content ui-corner-all">
      <label for="ina">Socio Ina</label>
      <input type="checkbox" checked name="socio"  class="text ui-widget-content ui-corner-all">
      <label for="contacto">Contacto</label>
      <input type="text" name="contacto" id="contacto" class="text ui-widget-content ui-corner-all">
      <label for="lada">Lada</label>
      <input type="text" name="lada" id="lada"  class="text ui-widget-content ui-corner-all">
      <label for="telefono">Telefono</label>
      <input type="text" name="telefono" id="telefono"  class="text ui-widget-content ui-corner-all">
      <label for="celular">Celular</label>
      <input type="checkbox" checked name="celular" id="celular"  class="text ui-widget-content ui-corner-all">
     <label for="email">email</label>
      <input type="text" name="email" disabled id="email"  class="text ui-widget-content ui-corner-all">
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>
</div>
</body>
</html>

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
There I go...

I need to know where the actio of the form goes to save the modified data
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
The form action is the current page.  You can name the page or leave blank.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

<%
if request.form<>"" then ' we have form data'
  empresa=request.form("empresa")

end if
%>

<!DOCTYPE html>
<html>
<head>
<link href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />

<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<script>
$(function() {
  
    $( "#dialog-form" ).dialog({
      modal: true,
      autoOpen: false, 
      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });
  
  $('a.openmodal').on('click',function(){// open the modal by clicking an a tag with class openmodal
    var theID = $(this).text();//set the value of the modal
    var Empresa =$(this).closest('tr').find('td:eq(1)').text();
    var Contacto  =$(this).closest('tr').find('td:eq(2)').text();
    var Usuario  =$(this).closest('tr').find('td:eq(3)').text();
    var Contrasena  =$(this).closest('tr').find('td:eq(4)').text();
    var logs  =$(this).closest('tr').find('td:eq(5)').text();
    var login  =$(this).closest('tr').find('td:eq(6)').text();
    
    $('#dialog-form input[name="id"]').val(theID);//Set the value of the input  named ID to the value of the ID we clicked. 
    
    $('#dialog-form input[name="empresa"]').val(Empresa);//Set the value of the input  named ID to the value of the ID we clicked. 
    
     $('#dialog-form input[name="email"]').val(Usuario);//Set the value of the input  named ID to the value of the ID we clicked. 
    
    
    //socio; lada;telefono;celular
    
    
    $('#dialog-form' ).dialog('open'); // now open the modal
    
  });
  
  
  });
  </script>
  
  <meta charset="utf-8">
  <title>Your Title</title>
</head>
<body>
<table id="MyTable" border="0" align="center" cols=9>
    <tr><td colspan=9 align="center">Filtro con 15 resultados. <br> </td>
      </tr>

  
    <tr>
      <td width=5  align="center">Id</td>
      <td width=100  align="center">Empresa</td>
      <td width=100  align="center">Contacto</td>
      <td width=100 align="center">Usuario</td>
      <td  width=10 align="center">Contraseña</td>
      <td  align="center">Logs</td>
      <td  align="center">Ultimo Login</td>
      <td align="center">Validar</td>

      
    </tr>
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >7</a>      
     </td>
       
       <td>eex</td>
       <td>ee</td>
       <td>roberto@pceditores.com</td>
       <td>cajecw</td>
       <td align="right">1</td>
       <td>29/07/2014 03:06:30 p.m.</td>
       <td align="center">
       <form method="get" name="valida7" action="cambiavalida.asp" target="MyIFrame">
        <input type=hidden name=id value=7>
        <input type=hidden name=valx value="no">
        
       <input type="checkbox" onchange="document.valida7.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  
        <tr bgcolor="#DADADD">      
  
       <td>    
      <a class="openmodal" href="#">15</a>      
     </td>
       
       <td>empresita</td>
       <td>Pepe</td>
       <td>robrodp@gmail.com</td>
       <td>hwpasf</td>
       <td align="right">8</td>
       <td>29/07/2014 02:46:49 p.m.</td>
       <td align="center">
       <form method="get" name="valida15" action="cambiavalida.asp" target="MyIFrame">
        <input type=hidden name=id value=15>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida15.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#">10</a>      
     </td>
       
       <td>emprezz</td>
       <td>Memo</td>
       <td>memo@noerapenal.com</td>
       <td>nvunae</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida10" action="cambiavalida.asp" target="MyIFrame">
        <input type=hidden name=id value=10>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida10.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  

     
       
  
     

     
       
  
<tr>
  <td>
        <a href="panelx.asp?filtrar=&pag=ant&mostrar=true&orden=">Anterior</a>
  </td>
    <td>
    <a href="panelx.asp?filtrar=&pag=sig&mostrar=true&orden=">Siguiente</a>
  </td>
  <td>
        <a href="panelx.asp?filtrar=&pag=pri&mostrar=true&orden=">Primera</a>
  </td>
    <td>
    <a href="panelx.asp?filtrar=&pag=ult&mostrar=true&orden=">Ultima</a>
  </td>
</tr>
<tr>
  <td colspan="4" align="center">
        1 de 2  
  </td>
</tr>

</table>
<div id="dialog-form" title="Create new user">
  <p class="validateTips">All form fields are required.</p>
 
  <form action="" method="post">
    <fieldset>
      <label>ID<label>
      <input disabled name="id">
      <label for="empresa">Empresa</label>
      <input type="text" name="empresa" id="empresa"  class="text ui-widget-content ui-corner-all">
      <label for="ina">Socio Ina</label>
      <input type="checkbox" checked name="socio"  class="text ui-widget-content ui-corner-all">
      <label for="contacto">Contacto</label>
      <input type="text" name="contacto" id="contacto" class="text ui-widget-content ui-corner-all">
      <label for="lada">Lada</label>
      <input type="text" name="lada" id="lada"  class="text ui-widget-content ui-corner-all">
      <label for="telefono">Telefono</label>
      <input type="text" name="telefono" id="telefono"  class="text ui-widget-content ui-corner-all">
      <label for="celular">Celular</label>
      <input type="checkbox" checked name="celular" id="celular"  class="text ui-widget-content ui-corner-all">
     <label for="email">email</label>
      <input type="text" name="email" disabled id="email"  class="text ui-widget-content ui-corner-all">
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>
</div>
</body>
</html>

Open in new window

0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
For the data not already in the table you can add data-something to the a tag.

<a class="openmodal" href="#" data-socio="abc123" data-lada="xyz456" data-telefono="123-122-1234" data-celular="123-123-1234">7</a> 

Open in new window


Then in the jquery you can access using
var socio =$(this).attr('data-socio');
var lada =$(this).attr('data-lada');
var telefono =$(this).attr('data-telefono');
var celular =$(this).attr('data-celular');

Open in new window


adding to my original code

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

<%
if request.form<>"" then ' we have form data'
  empresa=request.form("empresa")

end if
%>

<!DOCTYPE html>
<html>
<head>
<link href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />

<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<script>
$(function() {
  
    $( "#dialog-form" ).dialog({
      modal: true,
      autoOpen: false, 
      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });
  
  $('a.openmodal').on('click',function(){// open the modal by clicking an a tag with class openmodal
    var theID = $(this).text();//set the value of the modal
    var Empresa =$(this).closest('tr').find('td:eq(1)').text();
    var Contacto  =$(this).closest('tr').find('td:eq(2)').text();
    var Usuario  =$(this).closest('tr').find('td:eq(3)').text();
    var Contrasena  =$(this).closest('tr').find('td:eq(4)').text();
    var logs  =$(this).closest('tr').find('td:eq(5)').text();
    var login  =$(this).closest('tr').find('td:eq(6)').text();
    var socio =$(this).attr('data-socio');
    var lada =$(this).attr('data-lada');
    var telefono =$(this).attr('data-telefono');
    var celular =$(this).attr('data-celular');
    
    $('#dialog-form input[name="id"]').val(theID);//Set the value of the input  named ID to the value of the ID we clicked. 
    
    $('#dialog-form input[name="empresa"]').val(Empresa);//Set the value of the input  named ID to the value of the ID we clicked. 
    
     $('#dialog-form input[name="email"]').val(Usuario);//Set the value of the input  named ID to the value of the ID we clicked. 

      $('#dialog-form input[name="lada"]').val(lada);//Set the value of the input  named ID to the value of the ID we clicked. 

      $('#dialog-form input[name="telefono"]').val(telefono);//Set the value of the input  named ID to the value of the ID we clicked. 
    
    $('#dialog-form input[name="celular"]').val(celular);//Set the value of the input  named ID to the value of the ID we clicked. 
    
    
    
    //socio; lada;telefono;celular
    
    
    $('#dialog-form' ).dialog('open'); // now open the modal
    
  });
  
  
  });
  </script>
  
  <meta charset="utf-8">
  <title>Your Title</title>
</head>
<body>
<table id="MyTable" border="0" align="center" cols=9>
    <tr><td colspan=9 align="center">Filtro con 15 resultados. <br> </td>
      </tr>

  
    <tr>
      <td width=5  align="center">Id</td>
      <td width=100  align="center">Empresa</td>
      <td width=100  align="center">Contacto</td>
      <td width=100 align="center">Usuario</td>
      <td  width=10 align="center">Contraseña</td>
      <td  align="center">Logs</td>
      <td  align="center">Ultimo Login</td>
      <td align="center">Validar</td>

      
    </tr>
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >7</a>      
     </td>
       
       <td>eex</td>
       <td>ee</td>
       <td>roberto@pceditores.com</td>
       <td>cajecw</td>
       <td align="right">1</td>
       <td>29/07/2014 03:06:30 p.m.</td>
       <td align="center">
       <form method="get" name="valida7" action="cambiavalida.asp" target="MyIFrame">
        <input type=hidden name=id value=7>
        <input type=hidden name=valx value="no">
        
       <input type="checkbox" onchange="document.valida7.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  
        <tr bgcolor="#DADADD">      
  
       <td>    
      <a class="openmodal" href="#">15</a>      
     </td>
       
       <td>empresita</td>
       <td>Pepe</td>
       <td>robrodp@gmail.com</td>
       <td>hwpasf</td>
       <td align="right">8</td>
       <td>29/07/2014 02:46:49 p.m.</td>
       <td align="center">
       <form method="get" name="valida15" action="cambiavalida.asp" target="MyIFrame">
        <input type=hidden name=id value=15>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida15.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#">10</a>      
     </td>
       
       <td>emprezz</td>
       <td>Memo</td>
       <td>memo@noerapenal.com</td>
       <td>nvunae</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida10" action="cambiavalida.asp" target="MyIFrame">
        <input type=hidden name=id value=10>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida10.submit()" />
       
     </td>
       </form>
       </tr>
     

     
       
  

     
       
  
     

     
       
  
<tr>
  <td>
        <a href="panelx.asp?filtrar=&pag=ant&mostrar=true&orden=">Anterior</a>
  </td>
    <td>
    <a href="panelx.asp?filtrar=&pag=sig&mostrar=true&orden=">Siguiente</a>
  </td>
  <td>
        <a href="panelx.asp?filtrar=&pag=pri&mostrar=true&orden=">Primera</a>
  </td>
    <td>
    <a href="panelx.asp?filtrar=&pag=ult&mostrar=true&orden=">Ultima</a>
  </td>
</tr>
<tr>
  <td colspan="4" align="center">
        1 de 2  
  </td>
</tr>

</table>
<div id="dialog-form" title="Create new user">
  <p class="validateTips">All form fields are required.</p>
 
  <form action="" method="post">
    <fieldset>
      <label>ID<label>
      <input disabled name="id">
      <label for="empresa">Empresa</label>
      <input type="text" name="empresa" id="empresa"  class="text ui-widget-content ui-corner-all">
      <label for="ina">Socio Ina</label>
      <input type="checkbox" checked name="socio"  class="text ui-widget-content ui-corner-all">
      <label for="contacto">Contacto</label>
      <input type="text" name="contacto" id="contacto" class="text ui-widget-content ui-corner-all">
      <label for="lada">Lada</label>
      <input type="text" name="lada" id="lada"  class="text ui-widget-content ui-corner-all">
      <label for="telefono">Telefono</label>
      <input type="text" name="telefono" id="telefono"  class="text ui-widget-content ui-corner-all">
      <label for="celular">Celular</label>
      <input type="checkbox" checked name="celular" id="celular"  class="text ui-widget-content ui-corner-all">
     <label for="email">email</label>
      <input type="text" name="email" disabled id="email"  class="text ui-widget-content ui-corner-all">
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>
</div>
</body>
</html>

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
Great...

But request.form always returns empty so no updating takes place
0
 

Author Comment

by:robrodp
Comment Utility
Actually when I click ok it doesn´t reload the current page. So no updating takes place

Ihave my won validation code... can I use it or can I have all fields required as default?
0
 

Author Comment

by:robrodp
Comment Utility
It is not passing any values
0
 

Author Comment

by:robrodp
Comment Utility
I realize that my current page has one form per row to change filters order and validation

So I guess I need a way to identify when the current page is reloaded from the openmodal form

I am getting there
0
 

Author Comment

by:robrodp
Comment Utility
This is my code.  It is working except for the pat of not passing the form data.

Is there a work around?

<%
if request.form<>"" then ' we have form data'
Session.LCID = 1033
response.write request("ina") & "QWWW<br>"
response.write request("id") & "!!!!<br>"
empresa=request.Form("empresa")
socio=request.form("ina")
contacto=request.Form("contacto")
telefono=request.Form("telefono")
lada=request.Form("lada")
celular=request.Form("celular")
agent=Request.ServerVariables("HTTP_USER_AGENT")
ip=Request.ServerVariables("remote_addr") 
usuario=request.form("email")




               Set c = CreateObject("ADODB.Connection")
               c.Open cn
                sql=" update login " &_
                "set empresa='" & empresa & "'," &_
                "ina='" & ina & "'," &_
                "contacto='" & contacto &"'," &_
                "telefono='" & telefono &"'," &_
                "lada= '" & lada &"'," &_
			          "celular='" & celular &"'," &_
                "ip='" & ip &"'," &_
			          "agent='" & agent &"'," &_
                "fecha='" & hh  & "' where id=" & request("id")
                'response.wrsql & "<br>"
               
               c.Execute sql
               c.Close
               set c = nothing
end if
%>
<!DOCTYPE html>
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="http://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />

<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<script>
$(function() {
  
    $( "#dialog-form" ).dialog({
      modal: true,
      autoOpen: false, 
      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });
  
    $('a.openmodal').on('click',function(){// open the modal by clicking an a tag with class openmodal
    var theID = $(this).text();//set the value of the modal
    var Empresa =$(this).closest('tr').find('td:eq(1)').text(); 
    var Ina =$(this).closest('tr').find('td:eq(2)').text();
    var Lada =$(this).closest('tr').find('td:eq(3)').text();
    var Telefono =$(this).closest('tr').find('td:eq(4)').text();   
    var Celular =$(this).closest('tr').find('td:eq(5)').text();
    var Contacto =$(this).closest('tr').find('td:eq(6)').text();
    var Usuario =$(this).closest('tr').find('td:eq(7)').text();
    var Password =$(this).closest('tr').find('td:eq(8)').text();
    
    
    $('#dialog-form input[name="id"]').val(theID);
    $('#dialog-form input[name="empresa"]').val(Empresa);
    $('#dialog-form input[name="ina"]').val(Ina);
    $('#dialog-form input[name="lada"]').val(Lada);
    $('#dialog-form input[name="telefono"]').val(Telefono);
    $('#dialog-form input[name="celular"]').val(Celular);
    $('#dialog-form input[name="contacto"]').val(Contacto);
    $('#dialog-form input[name="usuario"]').val(Usuario);
    $('#dialog-form input[name="password"]').val(Password);
    
    $('#dialog-form' ).dialog('open'); // now open the modal
    
  });
  
  
  });
  

function openPanel(){
window.open('panel.asp','_top');
}


function formSubmit()
{
document.forms["myForm"].submit();
}


function trim(value) {
   var temp = value;
   var obj = /^(\s*)([\W\w]*)(\b\s*$)/;
   if (obj.test(temp)) { temp = temp.replace(obj, '$2'); }
   var obj = / +/g;
   temp = temp.replace(obj, " ");
   if (temp == " ") { temp = ""; }
   return temp;
}

function validateEmail(fieldValue) {
     return (/^[0-9a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/).test(fieldValue);
}

function Validate() {
              document.forma.empresa.value=trim(document.forma.empresa.value)
              if (document.forma.empresa.value.length == 0) {
               alert("Falta Empresa.");
                return(false)	         }
                
                document.forma.contacto.value=trim(document.forma.contacto.value)
              if (document.forma.contacto.value.length == 0) {
               alert("Falta Contacto.");
                return(false)	         }
		
              document.forma.lada.value=trim(document.forma.lada.value)
              if (document.forma.lada.value.length == 0) {
               alert("Falta Lada.");
                return(false)	         }

              document.forma.telefono.value=trim(document.forma.telefono.value)
              if (document.forma.telefono.value.length == 0) {
               alert("Falta Telefono.");
                return(false)	         }
  

  		if (!validateEmail(document.forma.email.value)) {
	     alert("La direccion de correo electronico no es valida.");
	     return false;
	         }	
	
	//document.forma.solicitar.value= "Solicitando...";
	//document.forma.solicitar.disabled = True;
	
	
	return (true)
        
}

  </script>
  
<title>Your Title</title>
</head>
<style type="text/css">  
body, p, td {
        font-family: Verdana, Serif;
        font-size: 10pt;
        color: black;
        font-weight: normal;
        
    }

</style>
<body>


<center>
<form action="expertx.asp" name="panel" method="post">
Filtro: <input type="text" name="filtrar" value="<%=request("filtrar")%>" onchange="document.panel.submit()"/>
Ordenar: x Empresa
<%if session("orden")="R" or session("orden")="" then%>
<input type="radio" checked  name="orden" value="R" onchange="document.panel.submit()"/>
<%else%>
<input type="radio"  name="orden" value="R" onchange="document.panel.submit()"/>
<%end if%>
x Usuario
<%if session("orden")="E" then%>
<input type="radio" checked name="orden" value="E" onchange="document.panel.submit()"/>
<%else%>
<input type="radio"  name="orden" value="E" onchange="document.panel.submit()"/>
<%end if%>
x Contacto
<%if session("orden")="C" then%>
<input type="radio" checked name="orden" value="C" onchange="document.panel.submit()"/>
<%else%>
<input type="radio"  name="orden" value="C" onchange="document.panel.submit()"/>
<%end if%>
x Contraseña
<%if session("orden")="P" then%>
<input type="radio" checked name="orden" value="P" onchange="document.panel.submit()"/>
<%else%>
<input type="radio" name="orden" value="P" onchange="document.panel.submit()"/>
<%end if%>
x Validado<%if session("orden")="V" then%>
<input type="radio" checked name="orden" value="V" onchange="document.panel.submit()"/>
<%else%>
<input type="radio" name="orden" value="V" onchange="document.panel.submit()"/>
<%end if%>

<input type="hidden" name="p" value=1>
<input type="hidden" name="mostrar" value=true>
<!--<input type="submit">-->
</form>
</center>

<%cn = application("parque")
session("valcon")="ok"
pag=request("pag")
if pag="" then
    pag="pri"
end if
orden=request("orden")
'response.write orden & " orden<br>"
session("orden")=orden

filtrar=request("filtrar")
session("filtrar")=filtrar
Set PanelSet = Server.CreateObject("ADODB.RecordSet")

part=" order by empresa "
sql="SELECT count(*) as quan FROM (SELECT ROW_NUMBER() OVER(" & part  & " ) AS rownum, id ,empresa,celular,telefono,contacto,usuario, password,validado,(select count(*) from track where track.id_u=login.id) as logins,(select top 1 fecha from track where track.id_u=login.id order by fecha desc) as lastlogin  FROM login where usuario like '%" & filtrar & "%' or empresa like '%" & filtrar &  "%' or contacto like '%" & filtrar & "%') AS login"
PanelSet.Open sql, cn
quan=PanelSet("quan")
PanelSet.Close
Set PanelSet=nothing%>
<table border="0" align="center" cols=9>
  	<tr><td colspan=9 align="center"><%response.write "Filtro con " & quan & " resultados. <br>"%>	</td>
  		</tr>
<%'response.write quan & "<br>"
widow=quan mod 10
if widow<=10 then
	widow=quan
end if
if widow=0 then
  totp=quan/10
  else
    totp=int(quan/10+1)
end if




select case pag
  case "ant"
  if session("pag")>1 then
    p=session("pag")-1
  else
    p=1
  end if
  
  case "sig"
  if session("pag")<totp then
    p=session("pag")+1
  else
    p=totp
  end if
  case "pri"
  p=1
  case "ult"
  p=totp
end select

session("pag")=p
 
ri=p*10-9
rf=p*10  

Set PanelSet = Server.CreateObject("ADODB.RecordSet")
select case orden
case "R"
part="ORDER BY empresa"
case "E"
part="ORDER BY usuario"
case "P"
part="ORDER BY password"
case "C"
part="ORDER BY contacto"
case "V"
part="ORDER BY validado"
case else
part="ORDER BY empresa"
end select

sql="SELECT * FROM (SELECT ROW_NUMBER() OVER(" & part  & " ) AS rownum, id ,empresa,ina,lada,celular,telefono,contacto,usuario, password,validado,(select count(*) from track where track.id_u=login.id) as logins,(select top 1 fecha from track where track.id_u=login.id order by fecha desc) as lastlogin  FROM login where usuario like '%" & filtrar & "%' or empresa like '%" & filtrar &  "%' or contacto like '%" & filtrar & "%') AS login WHERE rownum >=" & ri & " AND rownum <=" & rf 
'response.write sql & "<br>"

color=-1
PanelSet.Open sql, cn
if not PanelSet.Eof then
  PanelSet.MoveFirst%>
  
    <tr>
      <td width=5  align="center">Id</td>
      <td width=100  align="center">Empresa</td>
      <td width=5  align="center">INA</td>
      <td width=10  align="center">Lada</td>
      <td width=100  align="center">Telefono</td>
      <td width=5  align="center">Celular</td>
      <td width=100  align="center">Contacto</td>
      <td width=100 align="center">Usuario</td>
      <td  width=10 align="center">Contraseña</td>
      <td  align="center">Logs</td>
      <td  align="center">Ultimo Login</td>
      <td align="center">Validar</td>

      
    </tr>
    <%do while not PanelSet.Eof%>
     <%color=color * -1
     if color=1 then%>
        <tr bgcolor="#b5ebd6">
    <%else%>
        <tr bgcolor="#DADADD">      
  <%end if%>

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" ><%=PanelSet("id")%></a>      
     </td>
       
       <td><%=PanelSet("empresa")%></td>
       <td><%=PanelSet("ina")%></td>
      <td><%=PanelSet("lada")%></td>
      <td><%=PanelSet("telefono")%></td>
      <td><%=PanelSet("celular")%></td>


       <td><%=PanelSet("contacto")%></td>
       <td><%=PanelSet("usuario")%></td>
       <td><%=PanelSet("password")%></td>
       <td align="right"><%=PanelSet("logins")%></td>
       <td><%=PanelSet("lastlogin")%></td>
       <td align="center">
       <form method="get" name="valida<%=PanelSet("id")%>" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=<%=PanelSet("id")%>>
        <input type=hidden name=valx value="<%=PanelSet("validado")%>">
        <%if PanelSet("validado")="si" then %>
       <input type="checkbox" checked onchange="document.valida<%=PanelSet("id")%>.submit()" />
       <%else%>
       <input type="checkbox" onchange="document.valida<%=PanelSet("id")%>.submit()" />
       <%end if%>
     </td>
       </form>
     </td>
       </form>
       </tr>
<%PanelSet.MoveNext
loop%>
<td>
<a href="expertx.asp?filtrar=&pag=ant&mostrar=true&orden=">Anterior</a>
  </td>
    <td>
    <a href="expertx.asp?filtrar=&pag=sig&mostrar=true&orden=">Siguiente</a>
  </td>
  <td>
        <a href="expertx.asp?filtrar=&pag=pri&mostrar=true&orden=">Primera</a>
  </td>
    <td>
    <a href="expertx.asp?filtrar=&pag=ult&mostrar=true&orden=">Ultima</a>
  </td>
</tr>
<tr>
  <td colspan="4" align="center">
        1 de 2  
  </td>
</tr>

</table>
<iframe id="MyIFrame" name="MyIFrame" src="about:blank" style="display:none"></iframe>
<%end if
PanelSet.Close
Set PanelSet=nothing%>
<div id="dialog-form" title="Editar Usuario">
 <p class="validateTips">All form fields are required.</p>
  <form action="self">
    <fieldset>
      <label>ID<label>
      <input disabled name="id">
      <label for="empresa">Empresa</label>
      <input type="text" name="empresa" id="empresa"  class="text ui-widget-content ui-corner-all"><br>
      <label for="ina">Socio Ina</label>
      <input type="checkbox" checked name="ina"  class="text ui-widget-content ui-corner-all"><br>
      <label for="contacto">Contacto</label>
      <input type="text" name="contacto" id="contacto" class="text ui-widget-content ui-corner-all">
      <label for="lada">Lada</label>
      <input type="text" name="lada" id="lada"  size="3" class="text ui-widget-content ui-corner-all"><br>
      <label for="telefono">Telefono</label>
      <input type="text" name="telefono" id="telefono"  class="text ui-widget-content ui-corner-all"><br>
      <label for="celular">Celular</label>
      <input type="checkbox" checked name="celular" id="celular"  class="text ui-widget-content ui-corner-all"><br>
     <label for="email">email</label>
     <input type="text" name="usuario" disabled id="usuario"  class="text ui-widget-content ui-corner-all">
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" name="data-submit" value="update" style="position:absolute; top:-1000px">
    </fieldset>
  </form>
</div>
 
</body>
</html>

Open in new window

0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
I will be able to come back to this in a few hours
0
 

Author Comment

by:robrodp
Comment Utility
Thx
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Can you create a sample test link you can show the public and post that  here.  Take away anything that could be private.
0
 

Author Comment

by:robrodp
Comment Utility
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Ok, this is the rendered code of the form when it is active
<form method="POST">
    <fieldset>
      <label>ID<label>
      <input disabled="" name="id">
      <label for="empresa">Empresa</label>
      <input type="text" name="empresa" id="empresa" class="text ui-widget-content ui-corner-all"><br>
      <label for="ina">Socio Ina</label>
      <input type="checkbox" checked="" name="ina" class="text ui-widget-content ui-corner-all" value=""><br>
      <label for="contacto">Contacto</label>
      <input type="text" name="contacto" id="contacto" class="text ui-widget-content ui-corner-all">
      <label for="lada">Lada</label>
      <input type="text" name="lada" id="lada" size="3" class="text ui-widget-content ui-corner-all"><br>
      <label for="telefono">Telefono</label>
      <input type="text" name="telefono" id="telefono" class="text ui-widget-content ui-corner-all"><br>
      <label for="celular">Celular</label>
      <input type="checkbox" checked="" name="celular" id="celular" class="text ui-widget-content ui-corner-all" value=""><br>
     <label for="email">email</label>
     <input type="text" name="usuario" disabled="" id="usuario" class="text ui-widget-content ui-corner-all">
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" name="data-submit" value="update" style="position:absolute; top:-1000px">
    </label></label></fieldset>
  </form>

Open in new window


You can see this by using the browser console.  All the browsers have this, Chrome, Firefox, Safari, IE.
https://developer.chrome.com/devtools/docs/console
https://developer.mozilla.org/en-US/docs/Tools/Browser_Console

Also, probably my fault, but the form is missing a button to submit
<button type="submit">submit</button>

Open in new window

Let's switch out for what is there now
    <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" name="data-submit" value="update" style="position:absolute; top:-1000px">

Open in new window

Looks like the form action is missing and finally, the the last line has two closing label tags that probably don't need to be there
  </label></label></fieldset>

Open in new window

Make sure you are collecting form submit at the top of the page too.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:robrodp
Comment Utility
Improving

It goes to the update part at the beginnning, but when i try do do the sql I need the id

update,,,,,where id=" request("id")

But request id is not returning the value

If we can get that we are there

Run de script i sent before and it writes "Alfa" to make sureir starts whet it should.
0
 

Author Comment

by:robrodp
Comment Utility
Hi,,,, the modified script in on line.

Did you get a chance to check it?

The only missing part in the puzzle os how to pass the id so the daabase can be updated.

Thx
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
When I click submit, this is what I get
empresa=Esta&ina=&contacto=&lada=&telefono=&celular= Alfa
QWWW
!!!!
update loginx set empresa='Esta',ina='',contacto='',telefono='',lada= '',celular='',ip='70.197.180.232',agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36',fecha='' where id=
Microsoft SQL Native Client error '80040e14'

Incorrect syntax near '='.

/panelx/expertxx.asp, line 35

Open in new window


What is going on that produces this?  You should be able to do below to see everything that is submitted.
<%
response.write request.form
%>

Open in new window


Otherwise, request.form("some_variable")
0
 

Author Comment

by:robrodp
Comment Utility
Request.form("Id") returns an empty value.
You  can see it. I request.write all the request.form and all the data is there.. except for the I'd.
We are missing something.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Maybe try changing

<input disabled="" name="id">

to

<input disabled name="id">
0
 

Author Comment

by:robrodp
Comment Utility
After fiddling around I set

<input disabled name="id"> to

<input type="hidden"  name="id">

And you cant see the id, which is ok ut it is passed.

Thank you very much for your time and effort, it has been invaluable to me
0
 

Author Comment

by:robrodp
Comment Utility
Hi Scott...

In my checkboxes I cant seem to set them right.

If I check them or not they pastt as empty.

And I cannot decide in the modal form if they are checke or not and have no clue as how to set the "checked" option  when checked or not.

I cant seem to find a way to if else endif based on the the checkbox.

I am sure it is a javascript issue... ann you shed some lignt on the matter?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Send me the link you are working with to look at.  But all I will do is use the console.  

Check out https://developer.chrome.com/devtools/docs/console or https://developer.mozilla.org/en-US/docs/Tools/Web_Console

I will check back in 3 to 5 hrs
0
 

Author Comment

by:robrodp
Comment Utility
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Do you have a way to collect each item?  Make sure your spelling is correct. Your checkbox is named, ina.

<form method="POST">
    <fieldset>
      <input type="hidden" name="id" value="15">
      <label for="empresa">Empresa</label>
      <input type="text" name="empresa" id="empresa" class="text ui-widget-content ui-corner-all"><br>
      <label for="ina">Socio Ina</label>
      <input name="ina" type="hidden" value="">
      <input type="checkbox" name="ina" value="" class="text ui-widget-content ui-corner-all"><br>
      <label for="contacto">Contacto</label>
      <input type="text" name="contacto" id="contacto" class="text ui-widget-content ui-corner-all">
      <label for="lada">Lada</label>
      <input type="text" name="lada" id="lada" size="3" class="text ui-widget-content ui-corner-all"><br>
      <label for="telefono">Telefono</label>
      <input type="text" name="telefono" id="telefono" class="text ui-widget-content ui-corner-all"><br>
      <label for="celular">Celular</label>
      <input type="checkbox" name="celular" id="celular" value="" class="text ui-widget-content ui-corner-all"><br>
     <label for="email">email</label>
     <input type="text" name="usuario" disabled="" id="usuario" class="text ui-widget-content ui-corner-all">
     
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <!--<input type="submit" tabindex="-1" name="data-submit" value="update" style="position:absolute; top:-1000px">-->
      <button type="submit">submit</button>
        </fieldset>
  </form>

Open in new window


You can place this at the top of your page to see what is posted.
if request.form<>"" then
response.write request.form
end if

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
That is what I have and the resuts of the checkboxes are not there

Thx
0
 

Author Comment

by:robrodp
Comment Utility
ina and celular always pass as empty regardless if I check the or not
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Please post the results from adding the code below to the top of your page.

<%
if request.form<>"" then
response.write request.form
response.end
end if
%>

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
Hi no need to post them

Run the script nd there thay are at the top

All thevariables have their values except ina and celular that are checkboxes
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Ok, I see what the issue is.  The value for Ina and Celular are coming from the table, but there is no data in the table.  If the value of those checkbox's are static, then hard code the value (like "yes" or "1").  Otherwise, if the value is variable, make sure there is data in the table.  

If the data is static, make sure you remove the lines below from the jquery.
$('#dialog-form input[name="ina"]').val(Ina);
 $('#dialog-form input[name="celular"]').val(Celular);

On the asp side, you can check to see if there is a value submitted, if not, then use a default value.
INA ="some_default_value"
Celular = "some_default_value"
if request.form("ina")<>"" then
    INA = request.form("ina")
end if
if request.form("ina")<>"" then
    Celular = request.form("Celular")
end if

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
thx

i understand the issue. but when I check ina in the form it still returns an empty value. you can check it yourself.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Going back to what I just mentioned, the reason is the value from the input is being set by the value in the table column with the same name.  There is currently no value in the column for ina except for ID 8.  Click on ID 8 and submit the form and you get, id=8&empresa=ggguga&ina=%2C+&contacto=ggg&lada=ggg&telefono=ggg Alfa

If the value for that checkbox is static, then set it on the input, but then take away the the line of js that sets the value or it will be over written.  Otherwise, you have to make sure there is a value in the table column for INA.
0
 

Author Comment

by:robrodp
Comment Utility
try it next thing in the morning

thx for your expertise
0
 

Author Comment

by:robrodp
Comment Utility
If I dont use checkboxes all works ok.

Is there a way to use the data from textboxes so they appear on the table (say ina) as well as in the edit form as checkboxes and saved?
0
 

Author Comment

by:robrodp
Comment Utility
For example ina is either ther are partners or not. So checkboxes are pretty useful
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Ah, I just noticed you have two fields with the same name.
 <input name="ina" type="hidden" value="">
      <input type="checkbox" name="ina" value="" class="text ui-widget-content ui-corner-all"><br>

Open in new window

First, get rid of the hidden name ina. Then just hard code  the checkbox
   <input type="checkbox" name="ina" value="1" class="text ui-widget-content ui-corner-all">

Open in new window

Then in your  form receive code
INA ="0"
if request.form("ina")<>"" then
    INA = request.form("ina")
end if
if cstr(INA) = "1" then
    ' it was checked
end if

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
Since in is hardcoded it will alwys appear as set right?

The daabase will prbably be updated but the form will always shout is as checked...
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
>Since in is hardcoded it will alwys appear as set right?
No.  You only hard code the value.   If the field is not checked, it will not submit and be part of the request.form.  That is why I have this code below.  
INA ="0"
if request.form("ina")<>"" then
    INA = request.form("ina")
end if
if cstr(INA) = "1" then
    ' it was checked
end if

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
Great...

But the <input type="checkbox"> is never checked

The value is on the table and is variable the ther form never shows it as checked
0
 

Author Comment

by:robrodp
Comment Utility
I have no clue as to how set it as checked or not according to its value.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Should it always be checked? or only under specific instances?  If so, then what?

Example, you hard code the checkbox to a value of 1.  It is now unchecked.
<input name="ina" value="1" type=checkbox">

Open in new window

Next, we grab the value of the the column INA for the row we are on with this code we are already using.
 var Ina =$(this).closest('tr').find('td:eq(2)').text();

Open in new window

Finally, we test that variable for something and if it matches, set the checkbox to checked.  Let's say you use "yes" or "no" in the table.
if (Ina === 'yes'){
     $('#dialog-form input[name="ina"]').prop("checked", true);
}

Open in new window

You would put that in place of this line
 $('#dialog-form input[name="ina"]').val(Ina);

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
Well... that cuts it allright 100%

Thx again for your expertise. Is has been a crash course for me.
0
 

Author Closing Comment

by:robrodp
Comment Utility
I am impressed.... truely impressed

Thx 1,000,000
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Glad it worked out. Check out http://www.codecademy.com/learn for some real crash courses.  

Before you start on javascript and jquery, go through html and css and make sure you really understand basic html coding otherwise jquery will not make very much sense.

After html and css, start with beginning Javascript, then go to jquery and then back to advanced javascript and advanced jquery.

Using js/jquery is the type of thing you have to keep using over and over to "get it".
0
 

Author Comment

by:robrodp
Comment Utility
I want to take off the ok button from the form...

Thx
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Change

 $( "#dialog-form" ).dialog({
      modal: true,
      autoOpen: false, 
      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });

Open in new window


to

 $( "#dialog-form" ).dialog({
      modal: true,
      autoOpen: false
    });

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
Hi

something is not right. I dont know what I changed.

var Ina =$(this).closest('tr').find('td:eq(2)').text();
 alert(Ina);

It does not pass the value "1". And the checkbox is checked.
It pases an empty variable

You can see the example in:

http://parquevehicular.com/panelx/expertxx.asp#

$('a.openmodal').on('click',function(){// open the modal by clicking an a tag with class openmodal
    var theID = $(this).text();//set the value of the modal
    var Empresa =$(this).closest('tr').find('td:eq(1)').text(); 
    var Ina =$(this).closest('tr').find('td:eq(2)').text();
    alert(Ina);
    var Lada =$(this).closest('tr').find('td:eq(3)').text();
    var Telefono =$(this).closest('tr').find('td:eq(4)').text();   
    var Celular =$(this).closest('tr').find('td:eq(5)').text();
    var Contacto =$(this).closest('tr').find('td:eq(6)').text();
    var Usuario =$(this).closest('tr').find('td:eq(7)').text();
    var Password =$(this).closest('tr').find('td:eq(8)').text();

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
I set up an alert showing the value(Ina)  and it comes up as empty

For some reason it is not gtabbing it fromthe table
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
I added a form reset listener when the modal closes.  I also added an if statement to set the property to checked if Ina is set to 1 from your modification
 var Ina = $(this).closest('tr').find('td:eq(2) input').is(":checked") ? 1 : 0;

Open in new window



http://jsbin.com/copuq/1/edit?html,output
<!DOCTYPE html>
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="http://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />

<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<script>
$(function() {
  
    $( "#dialog-form" ).dialog({
      modal: true,
      autoOpen: false, 
      close: function( event, ui ) {
        $('#dialog-form form')[0].reset();
      }
      //buttons: {
       // Ok: function() {
       //   $( this ).dialog( "close" );
       // }
      //}
    });
  
    $('a.openmodal').on('click',function(){// open the modal by clicking an a tag with class openmodal
    var theID = $(this).text();//set the value of the modal
    var Empresa =$(this).closest('tr').find('td:eq(1)').text();
    var Ina = $(this).closest('tr').find('td:eq(2) input').is(":checked") ? 1 : 0;
   // alert(Ina);
    var Lada =$(this).closest('tr').find('td:eq(3)').text();
    var Telefono =$(this).closest('tr').find('td:eq(4)').text();   
    var Celular =$(this).closest('tr').find('td:eq(5)').text();
    var Contacto =$(this).closest('tr').find('td:eq(6)').text();
    var Usuario =$(this).closest('tr').find('td:eq(7)').text();
    var Password =$(this).closest('tr').find('td:eq(8)').text();
    
    
    $('#dialog-form input[name="id"]').val(theID);
    $('#dialog-form input[name="empresa"]').val(Empresa);
   //$('#dialog-form input[name="ina"]').val(Ina);
      if(Ina === 1){
            $('#dialog-form input[name="ina"]').prop('checked',true);
      }  
    $('#dialog-form input[name="lada"]').val(Lada);
    $('#dialog-form input[name="telefono"]').val(Telefono);
     $('#dialog-form input[name="celular"]').val(Celular);
    $('#dialog-form input[name="contacto"]').val(Contacto);
    $('#dialog-form input[name="usuario"]').val(Usuario);
    $('#dialog-form input[name="password"]').val(Password);
    
    $('#dialog-form' ).dialog('open'); // now open the modal
    
  });
  
  
  });



  </script>
  
<title>Your Title</title>
</head>
<style type="text/css">  
body, p, td {
        font-family: Verdana, Serif;
        font-size: 10pt;
        color: black;
        font-weight: normal;
        
    }

</style>
<body>


<center>
<form action="expertxx.asp" name="panel" method="get">
Filtro: <input type="text" name="filtrar" value="" onchange="document.panel.submit()"/>
Ordenar: x Empresa

<input type="radio" checked  name="orden" value="R" onchange="document.panel.submit()"/>

x Usuario

<input type="radio"  name="orden" value="E" onchange="document.panel.submit()"/>

x Contacto

<input type="radio"  name="orden" value="C" onchange="document.panel.submit()"/>

x Contraseña

<input type="radio" name="orden" value="P" onchange="document.panel.submit()"/>

x Validado
<input type="radio" name="orden" value="V" onchange="document.panel.submit()"/>


<input type="hidden" name="p" value=1>
<input type="hidden" name="mostrar" value=true>
<input type="submit">
</form>
</center>


<table border="0" align="center" cols=9>
  	<tr><td colspan=9 align="center">Filtro con 16 resultados. <br>	</td>
  		</tr>

  
    <tr>
      <td width=5  align="center">Id</td>
      <td width=100  align="center">Empresa</td>
      <td width=5  align="center">INA</td>
      <td width=10  align="center">Lada</td>
      <td width=100  align="center">Telefono</td>
      <td width=5  align="center">Celular</td>
      <td width=100  align="center">Contacto</td>
      <td width=100 align="center">Usuario</td>
      <td  width=10 align="center">Contraseña</td>
      <td  align="center">Logs</td>
      <td  align="center">Ultimo loginx</td>
      <td align="center">Validar</td>

      
    </tr>
    
        <tr bgcolor="#b5ebd6">
    

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >20</a>      
     </td>
       
       <td>de la hoz y cia</td>
       <td>
       	
       	<input type="checkbox" name="ina" checked disabled>
       	
       	</td>
       <td>66</td>
      <td>777</td>
      <td>
      	
       	<input type="checkbox" disabled>
       	
       	
      	      	</td>


       <td>Mike Perez</td>
       <td>mige@delahoz.com</td>
       <td>*******</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida20" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=20>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida20.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

        <tr bgcolor="#DADADD">      
  

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >10</a>      
     </td>
       
       <td>empresaaaaa</td>
       <td>
       	
       	<input type="checkbox" name="ina" checked disabled>
       	
       	</td>
       <td>551</td>
      <td>55555555</td>
      <td>
      	
       	<input type="checkbox" disabled>
       	
       	
      	      	</td>


       <td>Memo</td>
       <td>memo@noerapenal.com</td>
       <td>*******</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida10" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=10>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida10.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

        <tr bgcolor="#b5ebd6">
    

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >15</a>      
     </td>
       
       <td>empresitauha</td>
       <td>
       	
       	<input type="checkbox" name="ina" checked disabled>
       	
       	</td>
       <td>777</td>
      <td>55239912</td>
      <td>
      	
       	<input type="checkbox" checked disabled>
       	
      	      	</td>


       <td>Pepe</td>
       <td>robrodp@gmail.com</td>
       <td>*******</td>
       <td align="right">8</td>
       <td>29/07/2014 02:46:49 p.m.</td>
       <td align="center">
       <form method="get" name="valida15" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=15>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida15.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

        <tr bgcolor="#DADADD">      
  

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >13</a>      
     </td>
       
       <td>Esta</td>
       <td>
       	
       	<input type="checkbox" name="ina" checked disabled>
       	
       	</td>
       <td></td>
      <td></td>
      <td>
      	
       	<input type="checkbox" disabled>
       	
       	
      	      	</td>


       <td></td>
       <td>pcditores@gmail.com</td>
       <td>*******</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida13" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=13>
        <input type=hidden name=valx value="no">
        
       <input type="checkbox" onchange="document.valida13.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

        <tr bgcolor="#b5ebd6">
    

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >9</a>      
     </td>
       
       <td>ggg</td>
       <td>
       	
       	<input type="checkbox" name="ina" disabled>
       	
       	</td>
       <td></td>
      <td>ggg</td>
      <td>
      	
       	<input type="checkbox" disabled>
       	
       	
      	      	</td>


       <td>ggg</td>
       <td>juan@perez.com</td>
       <td>*******</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida9" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=9>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida9.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

        <tr bgcolor="#DADADD">      
  

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >8</a>      
     </td>
       
       <td>ggguga</td>
       <td>
       	
       	<input type="checkbox" name="ina" disabled>
       	
       	</td>
       <td>ggg</td>
      <td>ggg</td>
      <td>
      	
       	<input type="checkbox" disabled>
       	
       	
      	      	</td>


       <td>ggg</td>
       <td>juan@perez.com</td>
       <td>*******</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida8" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=8>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida8.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

        <tr bgcolor="#b5ebd6">
    

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >12</a>      
     </td>
       
       <td>kipk</td>
       <td>
       	
       	<input type="checkbox" name="ina" disabled>
       	
       	</td>
       <td>p</td>
      <td>p</td>
      <td>
      	
       	<input type="checkbox" disabled>
       	
       	
      	      	</td>


       <td>qqq</td>
       <td>mmar@seur.net</td>
       <td>*******</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida12" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=12>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida12.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

        <tr bgcolor="#DADADD">      
  

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >19</a>      
     </td>
       
       <td>kk</td>
       <td>
       	
       	<input type="checkbox" name="ina" checked disabled>
       	
       	</td>
       <td>55</td>
      <td>5555</td>
      <td>
      	
       	<input type="checkbox" disabled>
       	
       	
      	      	</td>


       <td>ugauga</td>
       <td></td>
       <td>*******</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida19" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=19>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida19.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

        <tr bgcolor="#b5ebd6">
    

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >14</a>      
     </td>
       
       <td>kk</td>
       <td>
       	
       	<input type="checkbox" name="ina" checked disabled>
       	
       	</td>
       <td>55</td>
      <td>5555</td>
      <td>
      	
       	<input type="checkbox" disabled>
       	
       	
      	      	</td>


       <td>kkk</td>
       <td>pceditores@gmail.com</td>
       <td>*******</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida14" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=14>
        <input type=hidden name=valx value="si">
        
       <input type="checkbox" checked onchange="document.valida14.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

        <tr bgcolor="#DADADD">      
  

  
 
    
        <tr bgcolor="#b5ebd6">
    
       <td>    
      <a class="openmodal" href="#" >17</a>      
     </td>
       
       <td>kkk</td>
       <td>
       	
       	<input type="checkbox" name="ina" checked disabled>
       	
       	</td>
       <td>kk</td>
      <td>kkk</td>
      <td>
      	
       	<input type="checkbox" disabled>
       	
       	
      	      	</td>


       <td>kkk</td>
       <td>peper@ieyrt.com</td>
       <td>*******</td>
       <td align="right">0</td>
       <td></td>
       <td align="center">
       <form method="get" name="valida17" action="cambiavalida.asp" target="MyIFrame">
       	<input type=hidden name=id value=17>
        <input type=hidden name=valx value="no">
        
       <input type="checkbox" onchange="document.valida17.submit()" />
       
     </td>
       </form>
     </td>
             </tr>

<td>
<a href="expertxx.asp?filtrar=&pag=ant&mostrar=true&orden=">Anterior</a>
  </td>
    <td>
    <a href="expertxx.asp?filtrar=&pag=sig&mostrar=true&orden=">Siguiente</a>
  </td>
  <td>
        <a href="expertxx.asp?filtrar=&pag=pri&mostrar=true&orden=">Primera</a>
  </td>
    <td>
    <a href="expertxx.asp?filtrar=&pag=ult&mostrar=true&orden=">Ultima</a>
  </td>
</tr>
<tr>
  <td colspan="4" align="center">

  </td>
</tr>

</table>
<iframe id="MyIFrame" name="MyIFrame" src="about:blank" style="display:none"></iframe>

<div id="dialog-form" title="Editar Usuario">
 <p class="validateTips">Todos los Campos Requeridos</p>
  <form method="POST">
    <fieldset>
      <input  type="hidden" name="id">
      <label for="empresa">Empresa</label>
      <input type="text" name="empresa" id="empresa"  class="text ui-widget-content ui-corner-all"><br>
      <label for="ina">Socio Ina</label>
      <input type="checkbox"  name="ina"  value="1" class="text ui-widget-content ui-corner-all"><br>
      <label for="contacto">Contacto</label>
      <input type="text" name="contacto" id="contacto" class="text ui-widget-content ui-corner-all">
      <label for="lada">Lada</label>
      <input type="text" name="lada" id="lada"  size="3" class="text ui-widget-content ui-corner-all"><br>
      <label for="telefono">Telefono</label>
      <input type="text" name="telefono" id="telefono"  class="text ui-widget-content ui-corner-all"><br>
      <label for="celular">Celular</label>
      <input type="checkbox" name="celular" id="celular"  value="si" class="text ui-widget-content ui-corner-all"><br>
     <label for="email">email</label>
     <input type="text" name="usuario" disabled id="usuario"  class="text ui-widget-content ui-corner-all">
     
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <!--<input type="submit" tabindex="-1" name="data-submit" value="update" style="position:absolute; top:-1000px">-->
      <button type="submit">Actualizar</button>
        </fieldset>
  </form>
</div>
 
</body>
</html>

Open in new window

0
 

Author Comment

by:robrodp
Comment Utility
Thats it...

Thx
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now