+ Reply to Thread
Results 1 to 7 of 7

Thread: Dynamic dropdown not fit in column

  1. #1
    Barn Enthusiast guddu is on a distinguished road guddu's Avatar
    Join Date
    Jul 2008
    Location
    Oxford UK
    Posts
    471
    Rep Power
    4

    Dynamic dropdown not fit in column

    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
    
    same probelm with this dropdown also.

    Thanks
    Love is physical attraction and mental destruction

  2. #2
    Super Sarcasm Mistress mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere's Avatar
    Join Date
    Mar 2008
    Location
    Wide Awake In Dreamland
    Posts
    830
    Rep Power
    8

    remove the On Error Resume Next and see if you get an error.
    Quote of the Month:
    INSIGHT: When the going gets tough, the tough get going. The smart left a long time ago.

    Questions to Ponder:
    Are people more violently opposed to fur rather than leather because it's much easier to harass rich women than motorcycle gangs?

    iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
    copyright © 2008 sbenj69

    Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.

  3. #3
    Barn Enthusiast guddu is on a distinguished road guddu's Avatar
    Join Date
    Jul 2008
    Location
    Oxford UK
    Posts
    471
    Rep Power
    4

    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.
    Love is physical attraction and mental destruction

  4. #4
    Barn Enthusiast guddu is on a distinguished road guddu's Avatar
    Join Date
    Jul 2008
    Location
    Oxford UK
    Posts
    471
    Rep Power
    4

    dropdown should bind in this column of table
    StrDisplay = StrDisplay & "<TD align=""left"">"& FillProtocolSettingNo()& "</TD>"
    Love is physical attraction and mental destruction

  5. #5
    Super Sarcasm Mistress mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere's Avatar
    Join Date
    Mar 2008
    Location
    Wide Awake In Dreamland
    Posts
    830
    Rep Power
    8

    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.
    Quote of the Month:
    INSIGHT: When the going gets tough, the tough get going. The smart left a long time ago.

    Questions to Ponder:
    Are people more violently opposed to fur rather than leather because it's much easier to harass rich women than motorcycle gangs?

    iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
    copyright © 2008 sbenj69

    Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.

  6. #6
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    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
    
    Then if you use:-
    Code:
    response.write(FillProtocolSettingNo)
    
    that should write out the code...I think...

    Hope that helps.

  7. #7
    Barn Enthusiast guddu is on a distinguished road guddu's Avatar
    Join Date
    Jul 2008
    Location
    Oxford UK
    Posts
    471
    Rep Power
    4

    yup u are rite.Thanks a lot RR.
    Love is physical attraction and mental destruction

+ Reply to Thread

Similar Threads

  1. Dropdown list
    By Shem in forum .NET Development
    Replies: 5
    Last Post: May 27th, 2008, 02:39 PM
  2. Dynamic dropdown list with multiple records
    By Rebelle in forum ASP Development
    Replies: 4
    Last Post: April 30th, 2008, 06:33 AM
  3. Concatenation of Column Data function
    By AOG123 in forum Access Database Samples
    Replies: 0
    Last Post: March 25th, 2008, 07:53 AM
  4. Creating Dynamic Dropdown Menu!?
    By jarvelous in forum ASP Development
    Replies: 1
    Last Post: March 20th, 2008, 01:30 PM
  5. Concatenation of Column data function....
    By Lauramc in forum SQL Code Samples
    Replies: 0
    Last Post: March 17th, 2008, 01:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO