Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

Firefox 4 ignoring table (<td></td>) property

  • 3 ответа
  • 23 имеют эту проблему
  • 17 просмотров
  • Последний ответ от cor-el

more options

I am working on upgrading the extension https://addons.mozilla.org/en-US/firefox/addon/156940/ for Firefox 4 compatibility.

Basically the extensions enhances the website by adding few query fields which are enclosed in the '<td></td>' format. Until FF 3.6.9, there are no issues. But in FF 4, it is ignoring <td></td> properties.

But it works with out any issues on latest releases of chrome and safari

I am working on upgrading the extension https://addons.mozilla.org/en-US/firefox/addon/156940/ for Firefox 4 compatibility. Basically the extensions enhances the website by adding few query fields which are enclosed in the '<td></td>' format. Until FF 3.6.9, there are no issues. But in FF 4, it is ignoring <td></td> properties. But it works with out any issues on latest releases of chrome and safari

Изменено Veekay

Выбранное решение

That is because the code is wrong.
You're lucky that it works in Firefox 3.6 , but Firefox 4.0 is more strict.

You try to add TD elements to the innerHTML of another TD element and that doesn't work.

<td id="navSearchBar" class="navSearchBar">Search</td>

You need to add <table> </table> around the code.

This code should work:

			if (lsa[0] == "jp")
			{
				searchTxt = "<table><td style=\"font-weight:bold; font-size:13px; padding-right:5px;\"><span style=\"float:left; width:28px;\">" + searchTxt + "</span></td>";
			}
			else
			{
				searchTxt = "<table><td style=\"font-weight:bold; font-size:13px; padding-right:5px;\">" + searchTxt + "</td>";
			}
			if (lsa[0] != "ca")
			{
				searchTxt += "<td style=\"padding-left:3px;\"><select id=\"p_76\" name=\"p_76\"><option value=''>Any<option value='1'>Prime<option value='1-'>Free</select></td>";
			}
			searchTxt += "<td style=\"padding-left:3px;\"><select id=\"pct-off\" name=\"pct-off\"><option value=''>0-100% <option value='10-'>10% <option value='20-'>20% <option value='30-'>30% <option value='40-'>40% <option value='50-'>50% <option value='60-'>60% <option value='70-'>70% <option value='80-'>80% <option value='90-'>90%</select></td></table>";
			searchObj.innerHTML = searchTxt;


(corrected text that got removed by a previous edit)

Прочитайте этот ответ в контексте 👍 0

Все ответы (3)

more options

Выбранное решение

That is because the code is wrong.
You're lucky that it works in Firefox 3.6 , but Firefox 4.0 is more strict.

You try to add TD elements to the innerHTML of another TD element and that doesn't work.

<td id="navSearchBar" class="navSearchBar">Search</td>

You need to add <table> </table> around the code.

This code should work:

			if (lsa[0] == "jp")
			{
				searchTxt = "<table><td style=\"font-weight:bold; font-size:13px; padding-right:5px;\"><span style=\"float:left; width:28px;\">" + searchTxt + "</span></td>";
			}
			else
			{
				searchTxt = "<table><td style=\"font-weight:bold; font-size:13px; padding-right:5px;\">" + searchTxt + "</td>";
			}
			if (lsa[0] != "ca")
			{
				searchTxt += "<td style=\"padding-left:3px;\"><select id=\"p_76\" name=\"p_76\"><option value=''>Any<option value='1'>Prime<option value='1-'>Free</select></td>";
			}
			searchTxt += "<td style=\"padding-left:3px;\"><select id=\"pct-off\" name=\"pct-off\"><option value=''>0-100% <option value='10-'>10% <option value='20-'>20% <option value='30-'>30% <option value='40-'>40% <option value='50-'>50% <option value='60-'>60% <option value='70-'>70% <option value='80-'>80% <option value='90-'>90%</select></td></table>";
			searchObj.innerHTML = searchTxt;


(corrected text that got removed by a previous edit)

Изменено cor-el

more options

Thank you so much for your help.

Is there a way i can sent you a private message. :-)

more options

You're welcome. I noticed that I accidentally removed some text while trying to make the code show properly, and I've tried to correct that.

This forum doesn't have a private message feature.

Изменено cor-el