Closed
Bug 122585
Opened 23 years ago
Closed 23 years ago
javascript code not working properly on mozilla
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: bmpc, Assigned: rogerl)
Details
<script type="text/javascript">
function select(obj) {
obj.style.borderColor = "#cccccc";
}
function deselect (obj) {
obj.style.borderColor = "#ffffff";
}
function goto (url) {
location = url;
}
</script>
<td onmouseover="select(this);" onmouseout="deselect(this);"
onmouseclick="goto('aaa.php');" align="center" style="cursor: hand; width: 70px;
border: 1px solid #ffffff;">destaques</td>
Works fine in MSIE.
--- ERRORS:
Error: select is not defined
Error: deselect is not defined
It's working now.
<script type="text/javascript">
select = function (obj) {
obj.style.borderColor = "#cccccc";
obj.style.cursor = "hand";
if (!obj.style.cursor) {
obj.style.cursor = "pointer";
}
}
deselect = function (obj) {
obj.style.borderColor = "#ffffff";
}
jump = function (url) {
window.location = url;
}
</script>
Comment 2•23 years ago
|
||
This bug is invalid. The identifier "goto" is a javascript reserved word, and
causes the problem script to abort due to the associated syntax errors.
Comment 3•23 years ago
|
||
Steven is correct; see the language specification Section 7.5.3,
"Future Reserved Words" in the ECMA-262 3rd Edition Final spec:
at http://www.mozilla.org/js/language/
bmpc: I know you realized this already in your Comment #1 above.
Thank you for using Bugzilla and Mozilla -
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•