Salvo
April 4, 2002, 10:34am
1
I know there is a root √ symbol/radical, ASCII code is & # 8730; (minus the spaces)
But according to…
http://www.lanwrights.com/books/htm...h4d2e/t0076.htm
…there are dedicated HTML commands to display root signs:
<SRQT> or <ROOT>
but these don’t work, have these tags been removed since HTML3?
(If so is there any other way I can do the same thing)
Thanks all
Salvo
Ruchir
April 4, 2002, 10:49am
2
well salvo … i dont know about such an HTML tag but if u desperately need it … try this JavaScript function –
in the following code - ‘x’ is the no of which u want the sqrt.
<script language="JavaScript">
var num=Math.sqrt(x);
document.write(num);
</script>
Salvo
April 4, 2002, 11:03am
3
Thanks Ruchir
Your code does work but I’m actually looking for a way to display the root sign, rather than calculate it, which I’ve already done by using x^(1/2).
Any more ideas would be grealty appreciated.
Salvo
Firstly please keep your questions in the same thread rather than starting a new one like you have here.
Secondly, √ will display a square root symbol, but I am not sure of browser compatibilty, but it works in IE6.
Glen
EDIT:
Heh, well to prove it, it shows up in the thread so here it is in code tags:
√
Grrrrr, even code tags do not work so its & # 8 7 3 0 ; without the spaces!
Salvo
April 4, 2002, 11:35am
5
Sorry about starting a second thread, but I thought it’s more appropriate in this, the HTML sub-forum, plus it’s urgent. Sorry.
While & # 8730; does render the radical, it does not provide the vinculum that clarifies the scope of the operation (ie. go over the entire expression - which I need it to do). I’m pretty sure it’s compatable with all browsers since its ASCII and was listed under the w3 guide.
Salvo
sowen
April 4, 2002, 12:30pm
6
Although by no means a perfect solution you could try the following;
<html>
<head>
<title>Square Root</title>
</head>
<body>
You could use an inline table
<table style="display:inline;" width="72" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14" height="9"> </td>
<td width="58" align="left" valign="bottom" height="9"><font face="Symbol"><strong>______</strong></font></td>
</tr>
<tr>
<td width="14" valign="top" align="right"><font face="Symbol" size="+2">Ö</font></td>
<td width="58">(<em>x</em>-1)+<em>y</em></td>
</tr>
</table>
like this
<p>or</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="508" valign="middle">
<div align="right">you could use nested tables </div>
</td>
<td width="65">
<table style="display:inline;" width="68" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14" height="9"> </td>
<td width="54" align="left" valign="bottom" height="9"><font face="Symbol"><strong>______</strong></font></td>
</tr>
<tr>
<td width="14" valign="top" align="right"><font face="Symbol" size="+2">Ö</font></td>
<td width="54">(<em>x</em>-1)+<em>y</em></td>
</tr>
</table>
</td>
<td width="558" valign="middle"> like this</td>
</tr>
</table>
<p> </p>
</body>
</html>
Viral
April 4, 2002, 6:10pm
7
There’s an entity for the square root symbol:
& radic ; (without the spaces) - √
–Viral
try this:
<p>√<span style="border-top: 1px solid #000000; font-size: 14px;">7563443</span></p>
You may have to adjust the font-size of the span to get it to appear right, based on what font you use and what browser you’re building for. It’s far from a perfect method, but it would accomplish what you are trying to do.
Sketch
Salvo
April 8, 2002, 8:30pm
9
Thanks Sketch
That’s a neat solution, very innovative.
I will share it with others at mathsforum (who have the same problem)
Salvo
I think what you really need for this kind of thing is MathML , but Sketch’s workaround is pretty neat.