LimeSurvey Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottom
TOPIC: Table width in IE
#39375
premc
Fresh Lemon
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Table width in IE 4 Months, 3 Weeks ago Karma: 0
Hi Limesurvey team,
I was trying to use some tables in my survey. The tables I have created works fine in Firefox, but when I try to test it in IE the tables are out of format.

I am using the width of a box as a variable which varies according to an answer from previous question, here is what I coded
Code:


<td width="{INSERTANS:44745X178X94857}%" bgcolor="#ffff00">&nbsp;</td>



this worked fine in Forefox, when I tested on IE it is converted to:
Code:


<td bgcolor="#ffff00">&nbsp;</td>



why would IE change the format? is there a way it can be fixed ?

thank you,

regards,
Premc
 
Logged Logged
  The administrator has disabled public write access.
#39380
tpartner
LimeSurvey Team
Posts: 981
graphgraph
User Offline Click here to see the profile of this user
Re:Table width in IE 4 Months, 3 Weeks ago Karma: 33
Why the "%"?
 
Logged Logged
 
Cheers,
Tony
  The administrator has disabled public write access.
#39393
tpartner
LimeSurvey Team
Posts: 981
graphgraph
User Offline Click here to see the profile of this user
Re:Table width in IE 4 Months, 3 Weeks ago Karma: 33
premc , if you're prepared to use a little JS you could do this:

Set up your survey to use JavaScript, give your table cells IDs and then add a small script to manipulate the styles after the page loads.

So the source of the question would look something like the following.

Code:


<script type="text/javascript" charset="utf-8">

    $(document).ready(function(){
        $('td.myCell1').css({
            'width':'{INSERTANS:17792X128X5621}px',
            'background-color':'#FFFF00'
        });

        $('td.myCell2').css({
            'width':'{INSERTANS:17792X128X5621}px',
            'background-color':'#00FFFF'
        });
    });

</script>

<table id="myTable">
    <tbody>
        <tr>
            <td class="myCell1">&nbsp;</td>
            <td class="myCell2">&nbsp;</td>
        </tr>
        <tr>
            <td class="myCell1">&nbsp;</td>
            <td class="myCell2">&nbsp;</td>
        </tr>
        <tr>
            <td class="myCell1">&nbsp;</td>
            <td class="myCell2">&nbsp;</td>
        </tr>
    </tbody>
</table>

 
Logged Logged
 
Last Edit: 2010/03/10 03:01 By tpartner.
 
Cheers,
Tony
  The administrator has disabled public write access.
#39435
premc
Fresh Lemon
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Table width in IE 4 Months, 3 Weeks ago Karma: 0
Hi Tony,
thanks a lot for your reply.

I am using the % because my one of the attributes for my alternatives is variability which changes according to another attribute.
Since it is kind of difficult for the survey respondent to interpret this, I am using a picture to describe the choices for each question. In the picture, the variability is shown as a shaded area around the mean value of the other attribute.
for example:
alt1: attribute1=20, var = -5 to +5 ==> 25%
alt2: attribute1=40, var = -15 to +15 ==> 37%

Again it is difficult to generate picture for each alternative, so I have discretized the picture into a table in which the cell representing the variability changes its width according to the variability value. This is the only method I figured will work for my representation.

I am already using JS for my survey, so I will try the code you provided and will let you know the results.

Thank you again,

regards
Prem
 
Logged Logged
  The administrator has disabled public write access.
#39465
Mazi
Moderator Lime
Posts: 6499
graph
User Offline Click here to see the profile of this user
Re:Table width in IE 4 Months, 3 Weeks ago Karma: 88
This sound like a very interesting approach. Is ti possible to see the survey live, prem?
 
Logged Logged
 
Best regards,
Mazi
______________________
Need help? I can: set up Limesurvey for you / create your survey / implement additional features / design your template / offer premium support --> Contact
  The administrator has disabled public write access.
#39512
premc
Fresh Lemon
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Table width in IE 4 Months, 3 Weeks ago Karma: 0
Hi Mazi,
thank you for your interest. The survey is still not active yet, will PM you with the link when it is done.

Thank you,

regards,
Prem
 
Logged Logged
  The administrator has disabled public write access.
#39520
tpartner
LimeSurvey Team
Posts: 981
graphgraph
User Offline Click here to see the profile of this user
Re:Table width in IE 4 Months, 3 Weeks ago Karma: 33
And me!
 
Logged Logged
 
Cheers,
Tony
  The administrator has disabled public write access.
Go to top
Donation Image