Closed Bug 15052 Opened 21 years ago Closed 20 years ago

Links href and Image src properties should be absolute URLs

Categories

(Core :: DOM: Core & HTML, defect, P3, major)

All
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: law, Assigned: law)

References

()

Details

Attachments

(1 file)

The href property of Link objects and the src property of Image objects simply
return the corresponding HTML element attribute values.  I believe that the JS
object properties should reflect the fully-qualified (absolute) URLs for these
objects.

The URL above is a page that demonstrates the problem.  In 4.x it displays the
fully qualified URLs.  Gecko shows only the relative ones.

These properties are necessary to implement context menu functions on links and
images.
With Img elements this worksforme. I'm using M10 on Win95 OSR2.

TEST CODE:
<HTML><HEAD>
<TITLE>Test Page</TITLE>
<SCRIPT LANGUAGE="javascript">

function go()
{
	window.alert(document.images.length);
	window.alert(document.images['Test'].src);
	window.alert(document.images[0].src);
}

</SCRIPT>
</HEAD><BODY onLoad="go()">
Test<BR>
<IMG NAME="Test" SRC="hi.gif">
</BODY></HTML>

RESULT:
Browser Alert: 0
Browser Alert: http://daryllap/hi.gif
Browser Alert: http://daryllap/hi.gif

ALSO See attachment below.
Assignee: vidur → law
I fixed this when I was doing context menus.  Forgot to update this bug.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Tested with 1999-11-11-09. Working excellent, so marking it verified.
You need to log in before you can comment on or make changes to this bug.