Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 populate droplist
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 May 2004 :  12:57:44  Show Profile
if that one piece of code is the only thing you have added, then i don't see where the error is.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

s80ts0465
Junior Member

Italy
290 Posts

Posted - 26 May 2004 :  13:46:05  Show Profile  Send s80ts0465 an ICQ Message
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
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 May 2004 :  14:03:16  Show Profile
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 ~
Go to Top of Page

s80ts0465
Junior Member

Italy
290 Posts

Posted - 26 May 2004 :  14:04:47  Show Profile  Send s80ts0465 an ICQ Message
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
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 May 2004 :  14:29:41  Show Profile
if you take out the code you added, do the other buttons work okay (the preview and such that was giving you problems) ?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

s80ts0465
Junior Member

Italy
290 Posts

Posted - 26 May 2004 :  14:33:21  Show Profile  Send s80ts0465 an ICQ Message
yes sure. When i comment my code, all the rest works perfectly
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 May 2004 :  14:36:28  Show Profile
and your code is just lines 536-563 ?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

s80ts0465
Junior Member

Italy
290 Posts

Posted - 26 May 2004 :  14:47:23  Show Profile  Send s80ts0465 an ICQ Message
in post.asp (post_info.asp is the original) yes it's all
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 May 2004 :  14:55:35  Show Profile
i'll look at it again later and see if i can figure it out.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

s80ts0465
Junior Member

Italy
290 Posts

Posted - 26 May 2004 :  14:59:23  Show Profile  Send s80ts0465 an ICQ Message
Ok many many thanks
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 26 May 2004 :  20:53:40  Show Profile
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 ~
Go to Top of Page

s80ts0465
Junior Member

Italy
290 Posts

Posted - 27 May 2004 :  04:24:16  Show Profile  Send s80ts0465 an ICQ Message
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
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 27 May 2004 :  05:45:55  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
quote:
In fact the page is reloaded, but the program sends me to the default.asp page.

That's because you have to pass the querystring to the page when you reload it.
Find this line:
Response.Write	"                <form name = ""Prova"" method=""post"" action=""post.asp"">" & vbNewLine & _

and replace it with
Response.Write	"                <form name = ""Prova"" method=""post"" action=""post.asp?" & Request.ServerVariables("QUERY_STRING") & """>" & vbNewLine & _

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

s80ts0465
Junior Member

Italy
290 Posts

Posted - 27 May 2004 :  06:31:14  Show Profile  Send s80ts0465 an ICQ Message
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
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 27 May 2004 :  07:22:05  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Replace the following line:
Response.Write " <option value=""" & objRsPROVA_gruppo & """>" & objRs("PROVA_gruppo") & "</option>" & vbNewLine

with:
Response.Write " <option value=""" & objRsPROVA_gruppo & """ " & chkSelect(Request.Form("Injection1"),objRS("PROVA_gruppo")) & ">" & objRs("PROVA_gruppo") & "</option>" & vbNewLine

Now the first select box should represent your choice.

What data is passed via the form? Can you post a link to the page so we can take a look?

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz

Edited by - OneWayMule on 27 May 2004 10:06:15
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07