Closed
Bug 12543
Opened 27 years ago
Closed 27 years ago
[TESTCASE] document.links[num].hash returns undefined.
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: desale, Assigned: vidur)
References
Details
Link.hash returns undefined instead of returning anchor name in URL
BUILDS:
08-24-13 [M9] [Apprunner/Viewer]
08-24-09 [M10] [Apprunner/Viewer]
STEPS TO REPRODECE:
1] Please copy HTML code I'm providing. Save it as HTML file.
2] Open this file with Apprunner/Viewer.
3] You'll see one "Result Text Box", and one button called "Check Link.hash".
4] Click this button.
EXPECTED RESULTS:
After clicking button "Check Link.hash", "Result Text Box" should show
"#angels".
ACTUAL RESULTS:
"Result Text Box" shows "undefined".
CODE:
<HTML>
<HEAD>
<TITLE>Link Test</TITLE>
</HEAD>
<SCRIPT>
<!--
function linkprop(){
document.workform.result.value=document.links[0].hash;
}
//-->
</SCRIPT>
<BODY>
<FORM NAME="workform">
<A HREF="http://www.netscape.com/index.html#angels">Test Link:
http://www.netscape.com/index.html#angels</A><BR>
Result Text Box<INPUT TYPE="text" SIZE="30" NAME="result" VALUE=""><BR>
<INPUT TYPE="button" NAME="but1" VALUE="Check Link.hash"
onClick="linkprop();"><BR><BR>
<H3>Expected Answer: #angels</H3>
</FORM>
</BODY>
</HTML>
END OF CODE:
In testcase I'm simply using document.links[0].hash to get anchor name.
Updated•27 years ago
|
Status: NEW → RESOLVED
Closed: 27 years ago
Resolution: --- → DUPLICATE
| Reporter | ||
Updated•27 years ago
|
Status: RESOLVED → VERIFIED
| Reporter | ||
Comment 2•27 years ago
|
||
Verified.
| Reporter | ||
Comment 3•27 years ago
|
||
Verified.
Updated•23 years ago
|
Blocks: MyFirstBug
can you explain me, I got #angels in result text box, but when I run the test case
for test matrics "JavaScript Object: Area" for Area001 in yahoo homepage it's
giving "#angels?ser=15" instead of "#angels1" etc. Please explain the difference
of behaviour.
You need to log in
before you can comment on or make changes to this bug.
Description
•