Note that there are some explanatory texts on larger screens.

plurals
  1. POJS & HTML post different table dependand of browser version
    primarykey
    data
    text
    <p>I have problem with creating dynamic table which will work in <code>Internet Explorer 6</code> because of <code>json</code> usage. I actually found nice work around. I want to implement script which will show different <code>html</code> table depends on version of the user browser. <br> Here is my browser version detector script:</p> <pre><code>&lt;script&gt; function getInternetExplorerVersion() // Returns the version of Windows Internet Explorer or a -1 // (indicating the use of another browser). { var rv = -1; // Return value assumes failure. if (navigator.appName == 'Microsoft Internet Explorer'){ var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; } function checkIEVersion() { var ver = getInternetExplorerVersion(); if ( ver&gt; -1 ) { if ( ver == 6.0 ){ &lt;? echo"&lt;TABLE id=\"tableToModify\" width=\"1100px\" border=\"1\" class='list questionaire' width='600'&gt;"; echo" &lt;TR class='columndesc'&gt;"; echo"&lt;TD WIDTH=\"50%\"&gt;Col1&lt;font color=\"red\"&gt;*&lt;/font&gt;&lt;/TD&gt;"; echo"&lt;TD WIDTH=\"50%\"&gt;Col1&lt;font color=\"red\"&gt;*&lt;/font&gt;&lt;/TD&gt;"; echo "&lt;/TABLE&gt;"; ?&gt; } echo"&lt;TABLE id=\"tableToModify\" width=\"1100px\" border=\"1\" class='list questionaire' width='600'&gt;"; echo" &lt;TR class='columndesc'&gt;"; echo"&lt;TD WIDTH=\"22%\"&gt;Col1&lt;font color=\"red\"&gt;*&lt;/font&gt;&lt;/TD&gt;"; echo"&lt;TD WIDTH=\"22%\"&gt;col2&lt;font color=\"red\"&gt;&lt;/font&gt;&lt;/TD&gt;"; echo"&lt;TD WIDTH=\"22%\"&gt;col3&lt;font color=\"red\"&gt;&lt;/font&gt;&lt;/TD&gt;"; echo"&lt;TD WIDTH=\"22%\"&gt;col4&lt;font color=\"red\"&gt;*&lt;/font&gt;&lt;/TD&gt;"; echo" &lt;TD WIDTH=\"22%\"&gt;col5&lt;font color=\"red\"&gt;*&lt;/font&gt;&lt;/TD&gt;"; echo" &lt;TD WIDTH=\"12%\"&gt; col6&lt;font color=\"red\"&gt;*&lt;/font&gt;&lt;/TD&gt;"; echo "&lt;/TABLE&gt;"; ?&gt; } } checkIEVersion(); &lt;/script&gt; </code></pre> <p>But right now I am getting errorz : <code>uncaught syntax exception</code>. I do realise that <code>php - echo</code> is the couse but I can't come with another idea especially when I want this table to be showed in the position I want it to be:</p> <p><br><br></p> <pre><code>Some html fields, imput tables buttons forms </code></pre> <p><br></p> <pre><code>Script I posted above </code></pre> <p><br></p> <pre><code>other form fields etc </code></pre> <p>to summarize I have <code>HTML</code> code above and under the script.<br>Can anyone give me a hint how to fix my problem?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload