Author |
Topic  |
Nikkol
Forum Moderator
    
USA
6907 Posts |
|
s80ts0465
Junior Member
 
Italy
290 Posts |
Posted - 26 May 2004 : 13:46:05
|
Nooo. so any clue about what is the problem :-((( what do u get the same error of me ??
but could the form be the problem??? |
Edited by - s80ts0465 on 26 May 2004 14:00:18 |
 |
|
Nikkol
Forum Moderator
    
USA
6907 Posts |
Posted - 26 May 2004 : 14:03:16
|
i just looked at the code, i did not run it. if you don't get the erro without the form part of the code, then it's got to be your code. and it seems that it is due to javascript, but i can't see where except for what i pointed out before. |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
 |
|
s80ts0465
Junior Member
 
Italy
290 Posts |
Posted - 26 May 2004 : 14:04:47
|
but is there a mod to work submitting and reloading without the form??? im ean now i "should" use onchange=document.Prova.submit() where Prova is the form name. Can i do something like this without the form?? and create a javascript function to call with the selection of the first droplist and send the value to the second one??maybe it works and doesn't need the submit() |
Edited by - s80ts0465 on 26 May 2004 14:11:45 |
 |
|
Nikkol
Forum Moderator
    
USA
6907 Posts |
|
s80ts0465
Junior Member
 
Italy
290 Posts |
Posted - 26 May 2004 : 14:33:21
|
yes sure. When i comment my code, all the rest works perfectly |
 |
|
Nikkol
Forum Moderator
    
USA
6907 Posts |
|
s80ts0465
Junior Member
 
Italy
290 Posts |
Posted - 26 May 2004 : 14:47:23
|
in post.asp (post_info.asp is the original) yes it's all |
 |
|
Nikkol
Forum Moderator
    
USA
6907 Posts |
|
s80ts0465
Junior Member
 
Italy
290 Posts |
Posted - 26 May 2004 : 14:59:23
|
Ok many many thanks |
 |
|
Nikkol
Forum Moderator
    
USA
6907 Posts |
Posted - 26 May 2004 : 20:53:40
|
This is the code you have:
Response.Write " <form name = ""Prova"" method=""post"" action=""post.asp"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Event:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select name=""Injection1"" size=""1"" tabindex=""-1"" onchange=documnet.Prova.submit()>" & vbNewLine
Set objDC = Server.CreateObject("ADODB.Connection")
strConn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/NewElogBook/logbook/database/elogbook.mdb")
objDC.Open strConn
Set objRs = objDC.Execute("Select PROVA_gruppo FROM FORUM_PROVA")
if NOT objRs.RecordCount = 0 then
Do While (Not objRs.EOF)
Response.Write " <option value=""" & objRS("PROVA_gruppo") & """>" & objRs("PROVA_gruppo") & "</option>" & vbNewLine
objRs.MoveNext
Loop
End If
Response.Write " </select>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </form></tr>" & vbNewLine
Change the red portions so that they look like:
Response.Write " <form name=""Prova"" method=""post"" action=""post.asp"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Event:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select name=""Injection1"" size=""1"" tabindex=""-1"" onChange=""document.Prova.submit();"">" & vbNewLine
Set objDC = Server.CreateObject("ADODB.Connection")
strConn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/NewElogBook/logbook/database/elogbook.mdb")
objDC.Open strConn
Set objRs = objDC.Execute("Select PROVA_gruppo FROM FORUM_PROVA")
if NOT objRs.RecordCount = 0 then
Do While (Not objRs.EOF)
Response.Write " <option value=""" & objRS("PROVA_gruppo") & """>" & objRs("PROVA_gruppo") & "</option>" & vbNewLine
objRs.MoveNext
Loop
End If
Response.Write " </select>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </form></tr>" & vbNewLine
|
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
 |
|
s80ts0465
Junior Member
 
Italy
290 Posts |
Posted - 27 May 2004 : 04:24:16
|
sorry but i always get the same error. i've tryed something. I've noted that our form code is inserted in another form (the one of the screen size that start at line 525 and end after our form), so i've tryed to insert our form before this form, at line 494 and on this way i don't get any error !!!!! moreover also the submit() of the screensize works perfectly, and also mine of submit works, even when not perfectly. In fact the page is reloaded, but the program sends me to the default.asp page. So the code is almost perfect;we still have to understand the reason which doesn't allow to my code to work inside another form, and now because after reloaded i return to defaul.asp I think that this is a good step forward to the solution. What do u say??
thankssssssssss a lotttt once again |
 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
s80ts0465
Junior Member
 
Italy
290 Posts |
Posted - 27 May 2004 : 06:31:14
|
Ok done. Now with this code
Response.Write " <form name = ""Prova"" method=""post"" action=""post.asp?" & Request.ServerVariables("QUERY_STRING") & """>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Event:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select name=""Injection1"" size=""1"" tabindex=""-1"" onChange=""document.Prova.submit();"">" & vbNewLine
Set objDC = Server.CreateObject("ADODB.Connection")
strConn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/NewElogBook/logbook/database/elogbook.mdb")
objDC.Open strConn
Set objRs = objDC.Execute("Select PROVA_gruppo FROM FORUM_PROVA")
if NOT objRs.RecordCount = 0 then
Do While (Not objRs.EOF)
Response.Write " <option value=""" & objRsPROVA_gruppo & """>" & objRs("PROVA_gruppo") & "</option>" & vbNewLine
objRs.MoveNext
Loop
End If
Response.Write " </select>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </form></tr>" & vbNewLine
objRs.Close
Set objRs = Nothing
objDC.Close
Set objDC = Nothing
Response.Write " <form name = ""Prova1"" method=""post"" action=""post.asp"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Event:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select name=""Injection2"" size=""1"" tabindex=""-1"" >" & vbNewLine
Set objDC = Server.CreateObject("ADODB.Connection")
strConn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/NewElogBook/logbook/database/elogbook.mdb")
objDC.Open strConn
strGruppo = Trim(Request.Form("Injection1"))
strsql = "Select PROVA_fault FROM FORUM_PROVA WHERE PROVA_gruppo='" & Request.Form("Injection1") & "'"
Set objRs = objDC.Execute(strSql)
if NOT objRs.RecordCount = 0 then
Do While (Not objRs.EOF)
Response.Write " <option value=""" & objRsPROVA_fault & """>" & objRs("PROVA_fault") & "</option>" & vbNewLine
objRs.MoveNext
Loop
End If
Response.Write " </select>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </form></tr>" & vbNewLine
objRs.Close
Set objRs = Nothing
objDC.Close
Set objDC = Nothing
i've added also the second dropdown list. The reloading is done, but the submitting doesn't seem to work fine, cause after the page is reloaded the first dropdown list doesn't present the selection, but presents the normal list, so the second droplist doesn't have the value for the WHERE...
bye stefano |
Edited by - s80ts0465 on 27 May 2004 06:36:26 |
 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
Topic  |
|