![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| ||||
| ||||
| hi i m creating dropdown on the fly.i m calling this function FillProtocolSettingNo see bold line.but problem is my dropdown is not creating at that column.it create drop down outside of that table.why this happening? Code: StrDisplay = StrDisplay & "<TR class=""HeaderRow"">" StrDisplay = StrDisplay & "<TD align=""left"">"& FillProtocolSettingNo()& "</TD>" StrDisplay = StrDisplay & "<TD align=""left"">"& FillDocumentTypeNo()& "</TD>" StrDisplay = StrDisplay & "<TD align=""left""><INPUT type=""text""></TD>" StrDisplay = StrDisplay & "<TD align=""left""><INPUT type=""text"" ></TD>" StrDisplay = StrDisplay & "<TD align=""left""><INPUT type=""text"" ></TD>" StrDisplay = StrDisplay & "<TD align=""right"" colspan=""2""><input type=""button"" name='btnAdd_"& vlMemberID &"' value=""Add Settings""></TD>" StrDisplay = StrDisplay & "</TR>" StrDisplay = StrDisplay & "</TBODY>" StrDisplay = StrDisplay & "</TABLE>" Response.write StrDisplay Code: Function FillProtocolSettingNo()
Dim rstProtocolSettingNo
On Error Resume Next
Set objData = Server.CreateObject("ProtocolSettings.clsSearcher")
Set rstProtocolSettingNo = objData.FillProtocolSettingNo()
If Not rstProtocolSettingNo.EOF Then
Response.write "<select id=""cboProtocolSettingNo"" name=""cboProtocolSettingNo"" style=""width:180px"">"
Response.write "<option>---- Select ProtocolSettingNo ----</option>"
While Not rstProtocolSettingNo.EOF
Response.write "<option value="& rstProtocolSettingNo("ProtocolSettingNo") & ">" & rstProtocolSettingNo("Description") &"</option>"
rstProtocolSettingNo.movenext
Wend
Response.write "</select>"
End If
If (err.number <> 0) Then strMsg = "Please resolve this error " & err.description
Set objData = Nothing
End Function
Thanks
__________________ Love is physical attraction and mental destruction |
| Sponsored Links |
|
#2
| ||||
| ||||
| remove the On Error Resume Next and see if you get an error.
__________________ Quote of the Month: Regret: It hurts to admit when you make mistakes - but when they're big enough, the pain only lasts a second. Questions to Ponder: Could it be that all those trick-or-treaters wearing sheets aren’t going as ghosts but as mattresses? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
|
#3
| ||||
| ||||
| i m not getting any error .drop down is populating well.only dropdown not fix up with in that column of table.it goes to outside of the table. |
|
#4
| ||||
| ||||
| dropdown should bind in this column of table StrDisplay = StrDisplay & "<TD align=""left"">"& FillProtocolSettingNo()& "</TD>" |
|
#5
| ||||
| ||||
| do you have an opening table and tbody tag? i don't see them in your code. just trying to narrow this down. i see nothing in the code i've seen so far that would render it outside the table. |
|
#6
| ||||
| ||||
| I think if you're using a function you'll need to return the code rather than just using response.write, which just writes it to the screen. Something like:- Code: Function FillProtocolSettingNo()
Dim rstProtocolSettingNo, returnddl
On Error Resume Next
Set objData = Server.CreateObject("ProtocolSettings.clsSearcher")
Set rstProtocolSettingNo = objData.FillProtocolSettingNo()
If Not rstProtocolSettingNo.EOF Then
returnddl = "<select id=""cboProtocolSettingNo"" name=""cboProtocolSettingNo"" style=""width:180px"">"
returnddl = returnddl & "<option>---- Select ProtocolSettingNo ----</option>"
While Not rstProtocolSettingNo.EOF
returnddl = returnddl & "<option value="& rstProtocolSettingNo("ProtocolSettingNo") & ">" & rstProtocolSettingNo("Description") &"</option>"
rstProtocolSettingNo.movenext
Wend
returnddl = returnddl & "</select>"
End If
If (err.number <> 0) Then strMsg = "Please resolve this error " & err.description
Set objData = Nothing
return returnddl
'or I think you can also set the name of the function to the value to return FillProtocolSettingNo=returnddl
End Function
Code: response.write(FillProtocolSettingNo) ![]() Hope that helps. |
| The Following User Says Thank You to richyrich For This Useful Post: | ||
guddu (August 19th, 2008) | ||
|
#7
| ||||
| ||||
| yup u are rite.Thanks a lot RR. |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dropdown list | Shem | .Net Development | 5 | May 27th, 2008 01:39 PM |
| Dynamic dropdown list with multiple records | Rebelle | ASP Development | 4 | April 30th, 2008 05:33 AM |
| Concatenation of Column Data function | AOG123 | Microsoft Access | 0 | March 25th, 2008 06:53 AM |
| Creating Dynamic Dropdown Menu!? | jarvelous | ASP Development | 1 | March 20th, 2008 12:30 PM |
| [SQL] Concatenation of Column data function.... | Lauramc | Code Samples | 0 | March 17th, 2008 12:32 PM |