Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    sondaggio in orizzontale

    Ho questo script per far votare le persone ad un sondaggio come posso fare in modo che le varie voci vanno in orizzontale invece che in verticale?

    codice:
    <%	lAnketID = request("ID")
    
    	set conn = Server.CreateObject("ADODB.Connection")
    	Set rs = Server.CreateObject("ADODB.Recordset")
    	conn.open sConnAnket
    	set rs.ActiveConnection = conn
    	rs.CursorType = adOpenStatic
    
    	sSQL = "SELECT SurveyID, SurveyName, SurveyQuestion FROM Surveys WHERE SurveyID = " & lAnketID
    	rs.Open sSQL, , , adCmdTable
    
    	if rs.eof or rs.bof then
    		response.write "Error : Survey not found
    Survey ID:" & lAnketID
    		response.end
    	end if
    	
    	sSurveyName = rs("SurveyName")
    	sSurveyQuestion = rs("SurveyQuestion")
    	
    	rs.close
    
    %>
    <form action="cast.asp?ID=<%=lAnketID%>" method="post">
    <table border="0" cellspacing="1" cellpadding="2" width="100%" bgcolor="#ffe4b5">
    	<tr>
    		<td class="header2"><%=sSurveyQuestion%></td>
    	</tr>
    	<%
    	sSQL = "SELECT OptionID, OptionText, AdditionalInformation FROM Options WHERE SurveyID = " & lAnketID
    	rs.Open sSQL, , , adCmdTable
    	
    	do while not rs.eof
    	%>
    		<tr>
    			<td class="smalltext">
    				<input type="radio" name="optSecenek" value="<%=rs("OptionID")%>">
    				<%If rs("AdditionalInformation") <> "" then%>
    					&name=<%=Server.URLEncode(rs("OptionText"))%>')"><%=rs("OptionText")%>
    				<%Else%>
    					<%=rs("OptionText")%>
    				<%End If%>
    			</td>
    		</tr>
    	<%
    		rs.movenext
    	loop
    	rs.close
    	%>
    	<tr>
    		<td align=right><input type="submit" name="cmdOyVer" value=" Send " class="flatbutton">
    		</td>
    	</tr>
    </table>
    </form>

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Togli <tr> e </tr> dal Loop

    Roby

  3. #3
    grazie tesoro :rollo:

  4. #4

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.