Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/06/2015, 09:22
glmafer23
 
Fecha de Ingreso: junio-2015
Mensajes: 2
Antigüedad: 8 años, 10 meses
Puntos: 0
Exclamación llamar un archivo js desde un submit en otro archivo

hola chicos requiero llamar un archivo js desde mi archivo reporte_sup.php , les mando el codigo para que seas mas faci igual y me pueden ayudar:

archivo reporte_sup.php

<head>
<meta charset="UTF-8">
<title>Encuesta</title>
<link rel="stylesheet" href="jdb/css/estilo.css">
<script language="JavaScript" src="js/verificaRadios.js"></script>
</head>
<body>
<h1>CUESTIONARIO</h1></center>

<br>
<div class="span 9">

<form action="controladores/altas/subir_reporte.php" method="post" onsubmit="radios.revisaRadios(this);">;


<H1>REVISION </H1>
<div class="span 6">
<div class="left1">
<table border="1" >
<tr>
<td rowspan=2>EQUIPO</th>
<th colspan=2>STATUS</th>
<td rowspan=2>OBSERVACION</td>
</tr>
<tr>
<th> SI </th>
<th> NO </th>

</tr>

<tr>
<td>Impermeables</td>
<th><input name="c1" type="radio" value="si"></th><th><input name="c1" type="radio" value="no"></th>
<td><input type="text" name="ob_impermeable" /></td>
</tr>

</body>

y aqui esta mi archivo JavaScript llamado verificaRadios.js

var radios=new verificaRadios();
function verificaRadios()
{
this.revisaRadios = function(f){
marcado=false;
for ( var i = 0; i < form.c1.length; i++ ) {
if (form.c1[i].checked)
marcado = true;
}

if(!marcado){
alert("Por favor, debe elegir una opción para impermeables!");
return false;
}



else{
return true;
}
}
}

no me deja llamar la funcion si pudieran ayudarme, gracias!