Pakistan IT Forum (Discuss Information Technology in Pakistan)
News: Boards and Categories have been modified. Please post your Feedbacks and Suggestions.
 
*
Hi, Guest. Welcome to IT Forum of Pakistan, Please login or register. January 07, 2009, 12:43:25 AM


Login with IT Forum's username, password and session length


Pak IT forum is launched to provide Pakistan's IT community with a platform to discuss IT related issues. These IT related discussions are proved to be useful for other Pakistani people. Information Technology in Pakistan is hottest issue on IT related forums. We hope that serious Pakistani people will join this IT Forum and will let us know about their experience in order to boast Pakistan's Software Exports.

Pages: [1]
  Print  
Author Topic: ListBox problem  (Read 811 times)
sheraz
Newbie
*
Posts: 17


View Profile
« on: May 30, 2007, 07:18:37 PM »

I have to make page with lots of questions (about 30-40) an the user must choose between 6 answers. I chose to use ListBox but the answers are very long and I can't split them with <br> or \n.

<option value="1" > 1. Blah blah <br>
blah blah </option>

The alternative is to use RadioButtos, but the page gets too big and user has to scroll a lot.
Any ideas?
Thanks in advance.
Logged
M_Farooq
Newbie
*
Posts: 8


View Profile
« Reply #1 on: May 30, 2007, 07:19:21 PM »

I would use radio buttons, its common way of doing multiple choice answers.
Logged
M_Farooq
Newbie
*
Posts: 8


View Profile
« Reply #2 on: May 30, 2007, 07:29:29 PM »

If you are worried about the page being too long with radio buttons, the other option is to have multiple pages. Put one or two questions on a page. I note that this is in the HTML forum, but this could be managed easily if you were storing the results into a database, you would just need to update the test data from page to page.
Logged
sheraz
Newbie
*
Posts: 17


View Profile
« Reply #3 on: May 30, 2007, 07:31:48 PM »

Now that i think about it, and read the last reply, another alternative is to use css or document object model to only show one answer at a time...
using something like this.style.display='none' or.. display: none; etc... then the answers are still all on one page, but you only show one answer at a time..
Logged
Mr.Bugz
Newbie
*
Posts: 29


xstrem_ice
View Profile WWW Email
« Reply #4 on: June 07, 2007, 08:01:18 AM »

php Dynamic |ist Menu C|ient
Quote
  <?php
include('connect.php');
$result = mysql_query("SELECT id,name FROM clients") or die(mysql_error());
while($row = mysql_fetch_array( $result )) { ?>
<option value="<?php echo $row['id'] ?>" selected><?php echo $row['name'] ?></option>
<?   } ?>
</SELECT>
Logged

Pages: [1]
  Print  
 
Jump to:  


Powered By: comsdev Partners