Closed
Bug 128698
Opened 23 years ago
Closed 21 years ago
javascript:foo.src = 'bar' returns true and therefore loads new page
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: poinde_t, Unassigned)
References
()
Details
Just go to the document and try to click on a image.
Javascript is not working.
The document is validated by W3C validator.
1. Go to http://capsi.com/starcrush/vahinagiocante/picture-gallery.html
2. Try to click on a image
Actuals results :
javascript:document.images['Starcrush'].src='/img/starcrush/vahinagiocante/3.jpg';
And the page is printing :
/img/starcrush/vahinagiocante/3.jpg
Expected Results :
Open the right image.
Comment 1•23 years ago
|
||
The W3C validator does not validate javascript. The javascript is syntactically
correct in any case.
It's odd. One would expect assignment to return the assigned value and since
it's not wrapped in void() that would be treated as data to show instead of the
page. Unfortunately, the site works in Netscape 4...
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale
Summary: Valid xhtml 1.0 strict document, but javascript not working → javascript:foo.src = 'bar' returns true and therefore loads new page
Comment 2•23 years ago
|
||
<script type="Javascript">
this is invalid.
type= should specify a MIME type, such as text/javascript or
application/x-javascript
also the javascript inside the comments can be ignored by parser and not
executed at all according to XHTML spec.
However that portion of JavaScript is not used and it shouldn't affect the page.
And it doesn't work in quirks mode either. Weird.
Comment 4•21 years ago
|
||
*** Bug 207746 has been marked as a duplicate of this bug. ***
Comment 5•21 years ago
|
||
I have a very similar Bug.
If I click on a button invoking javascript like:
javascript:AppelGuide('JF_GUIDE_ACTIVITE',document.form) in site:
http://www.pagesjaunes.fr/pj.cgi?
I get a new page with the characters "true" on upper left corner inside a white
page, instead of a response.
It works fine with Netscape 7.02 (windows 2000 sp3).
I'm using Mozilla firebird 0.6.
Comment 6•21 years ago
|
||
I just tried this (the URL in this bug), and I see the same result in IE as I do
in Mozilla builds. The webpage is broken, the javascript: URL's need to make
sure they don't return anything (or change the src of the page) or what they
return will be evaluated as a JS expression and converted to a string and parsed
by the browser. This is expected behaviour. Marking INVALID.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•