Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

razs

[Resolvido] form nao passa

Recommended Posts

Pessoal, isto funcionava mas derrepente quando agora dei uma volta para testar já nao esta a funcionar :S

 

o form é activado e se eu colocar um action no form ele vai para essa pagina mas deste nao mexe mais.

 

Alguma ideia do que se passara?

 

<!--#include file="permission.asp"-->
<!--#include file="connect.asp"-->
<!--#include file="css.asp"-->
<!--#include file = "logusers.asp"-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script>
$(function() {
	 $( ".calendario" ).datepicker({
		changeMonth: true,
		changeYear: true,
		yearRange: '-100:+40'
	});
});
</script>
</head>
<body>
<div id="wrapper1">
<div id="wrapper2">
<div id="container">
       <div id="menu">
    	<ul>
		<li><a href="contacts.asp" target="_parent">CONTACT US</a></li> 
		<li><a href="index.asp" target="_parent">HOME</a></li>
          	<li><a href="#" target="blank">OTHER</a></li>             
       </ul>  
   </div>
   <br><br><div id="header_banner">
   	<div id="header">
       	<div id="sitetitle">
           	<span></span>
		</div>
     <div id="tagline"></div>
       </div>
       <div id="banner">
       	<div id="bannertext">
           	<br /><span></span><br />
           </div>
			<%
		dim msg
		msg = request.queryString("msg")
		%>	
       </div>
   </div>
   <div id="content">
   	<div id="leftcolumn">
       	<div class="login_form">
       	<%
                If Session("user") = "" then 
           %>
          	<h1>Login</h1>
       	<% response.write request.queryString("erro") %>
		<% if Session("tent")<"5" and Session("tent1")<"5" then
		%>
		<form name="insform" method="POST" id="insform">
		  <div class="form_row"><label>Username</label><br><input name="user" type="text" class="inputfield" id="user" maxlength="60"/>
             </div>
                   <div class="form_row"><label>Password</label><br><input name="pass" type="password" class="inputfield" id="pass" maxlength="60"/>
             </div>
                   <br><input type="image" class="image" id="insform" name="insform" src="images/ok.jpg">
		  </form>
		  <%else
		  End if%>
		  <br><br><% if Session("tent")<"5" and Session("tent1")<"5" then%>|<a href="recpass.asp" target="_self">Password Recovery</a>|<%end if%>
		  <%
		Else
		%>Welcome: <%Response.Write(Session("user"))
If Session("status") = "1" then 
		%>
		<br><a href="addfiles.asp">Insert Data</a>	|	<a href="updatuser.asp">Update</a>	|	<a href="cert.asp">Certification</a>	 
		<br><a href="addpat.asp">Add Patient</a>	|	<a href="viewpat.asp">View Patient</a>
		<br><a href="fechar.asp">Log off</a>
<%			
end if	
if Session("status") = "2"  then %>
		<br><a href="viewdata.asp">View Data</a>	|	<a href="updatuser.asp">Update</a>	|	<a href="cert.asp">Certification</a>	 
		<br><a href="viewpat.asp">View Patient</a>
		<br><a href="fechar.asp">Log off</a>
<%end if
if Session("status") = "3" then %>
<br><br><ul id="qm0" class="qmmc">
<li><a class="qmparent" href="javascript:void(0)">Data</a>
	<ul>
	<li><a href="viewdata.asp">View Data</a></li>
	</ul></li>
<li><a class="qmparent" href="javascript:void(0)">Users</a>
	<ul>
	<li><a href="reguser.asp">Add User</a></li>
	<li><a href="viewuser.asp?tbl2=username&dir=asc">View User</a></li>
	<li><a href="updatuser.asp">Update User</a></li>
	</ul></li>
<li><a class="qmparent" href="javascript:void(0)">Studys</a>
	<ul>
	<li><a href="addstudy.asp">Add Study</a></li>
	<li><a href="viewstudy.asp">View Study</a></li>
	</ul></li>
<li><a class="qmparent" href="javascript:void(0)">Centers</a>
	<ul>
	<li><a href="addcenter.asp">Add Center</a></li>
	<li><a href="viewcenter.asp">View Center</a></li>
	</ul></li>
<li><a class="qmparent" href="javascript:void(0)">Patient</a>
	<ul>
	<li><a href="viewpat.asp">View Patient</a></li>
	</ul></li>	
<li><a class="qmparent" href="javascript:void(0)">Security</a>
	<ul>
	<li><a href="security.asp">Missing Attempts</a></li>
	<li><a href="log.asp">Log</a></li>
	</ul></li>
<li><a class="qmparent" href="javascript:void(0)">News</a>
	<ul>
	<li><a href="addnews.asp">Add News</a></li>
	<li><a href="vernews.asp">View/Delete News</a></li>
	</ul></li>
<li><a class="qmparent" href="fechar.asp">Log Off</a>	
<li class="qmclear"></li></ul>
<script type="text/javascript">qm_create(0,false,0,500,'all',false,false,false,false);</script>
<%end if%><%end if%>
		</div>    
        <div class="spacetobottom"></div>  
		 </div>
	        <div id="rightcolumn">
        	<div class="twocolumn">
<form name="insform" method="POST" id="insform">
<h4>Add a new Patient</h4>
<br><u><B><% response.write request.queryString("msg") %></B></u>
<br><br>	           		
<div class="field"><label>Patient Initials</label><input type="text" name="pat_init" id="textboxes" value=""  >*</div>
<div class="field"><label>Patient Number</label><input type="text" name="pat_numb" id="textboxes" value=""  >*</div>
<div class="field"><label>Gender</label><select size="1" name="gender" id="">
<option selected>Choose</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>*</div>
<div class="field"><label>Study</label><select size="1" name="study" id="">
<option selected value="">Choose</option>
<%
instotal2 = "select nome_study from usercenter group by nome_study" 
rs2.open instotal2,conn,2,2
	While Not rs2.EOF%>
	<option value="<%= rs2("nome_study") %>"><%= rs2("nome_study") %></option>
<%
rs2.MoveNext
Wend
rs2.Close
Set rs2 = Nothing
%>
</select>*</div>
<div class="data"><div class="field"><label>Date Birth</label><input class="calendario" type="text" name="data_nasc"></div></div>
</div>	
<br><br>
<div class="more_button"><input type="image" class="image" id="insform" name="insform" src="images/ok.jpg"></div>
<%
usr=session("user")
instotal3 = "select center from usercenter where username like '"&usr&"'" 
rs3.open instotal3,conn,2,2%>
<br><input type="hidden" name="center" value="<%=rs3("center")%>">
<%rs3.Close
Set rs3 = Nothing
%>
 Fields mark with (*) are mandatory.<br><br><br>

</form>

<%   
if request.form("insform.x")>0 then

response.write "1111111111111111111111"

if request.form("gender")="" or request.form("pat_numb")="" or request.form("pat_init")="" or request.form("study")=""  or request.form("data_nasc")="" then 	
        response.Write("<script>alert('Please fill all fields mark with (*) !');location.href='javascript:history.go(0)'</script>")
else
 instotal = "select * from patient WHERE P_Init = '" & Request.Form("pat_init") & "' and study = '" & Request.Form("study") & "'"
  rs.open instotal,conn,2,2
	 If not rs.EOF Then 
        response.Write("<script>alert('That Patient already exist in that study!');location.href='javascript:history.go(0)'</script>")
		Else

response.write "1"
rs.addnew
rs.fields("genero")=request.form("gender")
       rs.fields("pat_numb")=request.form("pat_numb")
       rs.fields("data_reg")=date()
rs.fields("P_Init")=request.form("pat_init")
rs.fields("study")=request.form("study")
rs.fields("data_nasc")=request.form("data_nasc")
rs.fields("add_by")=Session("user")
rs.fields("center")=request.form("center")

response.write "2"	
session("var_data")=request.form("study")
session("var_user")=request.form("pat_init")
session("acao")="add_patient"
call log

response.write "3"	
       rs.update
rs.close

           response.Write("<script>alert('Patient added successfully!');location.href='javascript:history.go(-1)'</script>")

		end if
end if
  conn.close
end if
%>
           <div class="spacetobottom"></div>               
       </div>
 	</div>
   </div>
</div> 
</div>
</body>
</html>     

Compartilhar este post


Link para o post
Compartilhar em outros sites

foi alterado alguma coisa ?!?!

os includes estão normais

 

neste form

<form name="insform" method="POST" id="insform">

 

ele esta sem action

Compartilhar este post


Link para o post
Compartilhar em outros sites

o form nao tem action, ao clicar ele vai activar isto

request.form("insform.x")>0

 

 

mas nao o faz, nao percebo porque.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Não localizei em seu code onde ele altera o valor dessa variável. Outra coisa, não utilize . em vars.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.