Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > cannot recognize....

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-07-04, 21:34
fisya fisya is offline
Registered User
 
Join Date: Mar 2004
Posts: 53
cannot recognize....

hi everybody...
i really need help to solve my problem...i have a page(template_admin2.asp) where the the user will key in the information and all the information will be sent to another page(post.asp). in post.asp, update query will be process. the problem now is there is a list menu which i name it select.select will contain information that will be update to tb_aduan( field name- arahan).but, post.asp cannot recognize what information that contain in select.

coding in template_admin2.asp

<select name="select" size="1" title="<%=(Recordset2.Fields.Item("arahan").Value) %>">
<%
While (NOT Recordset2.EOF)%>
<option value="<%=(Recordset2.Fields.Item("arahan").Value) %>"><%=(Recordset2.Fields.Item("arahan").Value)%>< /option>
<%
Recordset2.MoveNext()
Wend
If (Recordset2.CursorType > 0) Then
Recordset2.MoveFirst
Else
Recordset2.Requery
End If
%>
'<%
'arah=(Recordset2.Fields.Item("arahan").Value)%>
</select>


while the update command in post.asp is

Dim keadaan
Dim stat
Dim aduan
Dim arah
Dim ked
Dim lapo
Dim ganti
Dim uph
Dim kos
Dim perunding
Dim jumlah
Dim db
Dim rs
Dim UpdateQuery

aduan=request.Form("idaduan")
stat= request.Form("select2")
arah= request.Form("select")
ked= request.Form("keadaan")
lapo= request.Form("textarea")
ganti= request.Form("textarea2")
uph= request.Form("textfield")
kos= request.Form("textfield2")
perunding= request.Form("textfield3")
jumlah= request.Form("textfield4")

set db=Server.CreateObject("ADODB.Connection")
db.open "sambung"
ked=session("idkeadaan")
response.Write(ked)
'response.write(arah)


if (ked=1) then
'response.write("1")
response.write(arah)
'UpdateQuery =" UPDATE tb_aduan SET status_id='"&stat&"',arahan='"&arah&"',keadaan='"& ked&"',laporan ='"&lapo&"',bhn_ganti ='"&ganti&"',upah='"&uph&"',kos_bhn='"&kos&"',peru ndingan='"&perunding&"',jumlah_kos='"&jumlah&"' WHERE id_aduan="&aduan&"'"
UpdateQuery =" UPDATE tb_aduan SET arahan='"&arah&"' WHERE id_aduan="&aduan&""
set rs=db.execute(UpdateQuery)

else
'response.write("2")
response.write(arah)
UpdateQuery =" UPDATE tb_aduan SET status_id='"&stat&"',keadaan='"&ked&"',laporan ='"&lapo&"',bhn_ganti ='"&ganti&"',upah='"&uph&"',kos_bhn='"&kos&"',peru ndingan='"&perunding&"',jumlah_kos='"&jumlah&"' WHERE id_aduan="&aduan&""
set rs=db.execute(UpdateQuery)

end if
db.close


please help meee
Reply With Quote
  #2 (permalink)  
Old 06-07-04, 22:03
rokslide rokslide is offline
Coffee Minion
 
Join Date: Nov 2003
Location: Sydney
Posts: 1,515
Firstly make sure your select box is inside you form tags.

Try changing the name of the select box to something other then select (it shouldn't cause a problem but it might).

When you response.write(arah) is anything written?

Other then that, post the rest of the first file and I'll have a look (post.asp looks fine).
Reply With Quote
  #3 (permalink)  
Old 06-08-04, 02:34
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Recordset2.Fields.Item("arahan").Value

You use this value for both the name of the Select tag, the value of the select options, and the label for the select options. Therefore, it seems like the select box is not being passed with the name you are expecting.

It may be helpful to post the compiled HTML so we can see what is actually being generated by your ASP.
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #4 (permalink)  
Old 06-08-04, 02:37
rokslide rokslide is offline
Coffee Minion
 
Join Date: Nov 2003
Location: Sydney
Posts: 1,515
It's the title of the select box not the name so in theoty it should be okie as the name is set to "select"
Reply With Quote
  #5 (permalink)  
Old 06-08-04, 02:41
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Yeesh.. you're correct... sorry.. I just got back from the Presidential Library... I'm beat... I think you might be right about the location of the <form> tag...
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On