¿Se pueden meter scriptlets entre codigo jscript?
Publicado por carlos (2 intervenciones) el 06/06/2003 16:51:53
<script language="javascript">
<%try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("Jdbc:Odbc:carlos", "root", "");
cons = conn.createStatement();
ResultSet res=cons.executeQuery("select * from tipo_incidencia");
ResultSetMetaData rsmd=res.getMetaData();
Vector v;
}catch(Exception e){
e.printStackTrace();
}%>
var tipo=new Array("Software", "Hardware");
var soft=new Array ("OFFICE","CONTAPLUS","DREAMWEBER");
var hard=new Array ("RATON","PANTALLA","CPU");
var valores_select_2=new Array(soft, hard);
function escribir_tipo(valores){
for(var i=0;i<valores.length;i++)
window.document.writeln('<OPTION VALUE="'+valores[i]+'">'+valores[i]+'</OPTION>');
}
function cambiar(valores_tipo, valores_select_2){
var indice=document.frm.select_tipo.selectedIndex;
document.frm.elemento.length=valores_select_2[indice].length;
for(var i=0;i<valores_select_2[indice].length;i++)
{
document.frm.elemento.options[i].text=valores_select_2[indice][i];
document.frm.elemento.options[i].value=valores_select_2[indice][i];
}
document.frm.elemento.selectedIndex=0;
}
</script>
<%try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("Jdbc:Odbc:carlos", "root", "");
cons = conn.createStatement();
ResultSet res=cons.executeQuery("select * from tipo_incidencia");
ResultSetMetaData rsmd=res.getMetaData();
Vector v;
}catch(Exception e){
e.printStackTrace();
}%>
var tipo=new Array("Software", "Hardware");
var soft=new Array ("OFFICE","CONTAPLUS","DREAMWEBER");
var hard=new Array ("RATON","PANTALLA","CPU");
var valores_select_2=new Array(soft, hard);
function escribir_tipo(valores){
for(var i=0;i<valores.length;i++)
window.document.writeln('<OPTION VALUE="'+valores[i]+'">'+valores[i]+'</OPTION>');
}
function cambiar(valores_tipo, valores_select_2){
var indice=document.frm.select_tipo.selectedIndex;
document.frm.elemento.length=valores_select_2[indice].length;
for(var i=0;i<valores_select_2[indice].length;i++)
{
document.frm.elemento.options[i].text=valores_select_2[indice][i];
document.frm.elemento.options[i].value=valores_select_2[indice][i];
}
document.frm.elemento.selectedIndex=0;
}
</script>
Valora esta pregunta


0