Hello,
Above JS function if I put it on a form or a page it works. But If I call using a reference for example,
on a form or a page, then it does not work.Any idea what is wrong in the code?
Thanks
MS
Hello,
Above JS function if I put it on a form or a page it works. But If I call using a reference for example,
on a form or a page, then it does not work.Any idea what is wrong in the code?
Thanks
MS
Subject: JS Question
What JS error are you receiving when you include it from a reference?
Subject: RE: JS Question
Thanks for your reply. I don’t see any error. Expected output, July 25, 2005 does not show up.
Thanks
MS
Subject: RE: JS Question
Try opening the page in Mozilla (Netscape 6/7 or Firefox) and checking the JavaScript console. It will tell you if there’s a load error and if there is one, what type of error it is (a 404, malformed URL, incorrect MIME type, or what have you).
Subject: JS Question
Hi Manish,
Try changing your ref… from:
</ To:Subject: RE: JS Question
What? “Treat as HTML” is NOT a viable solution in ND6 or higher. “Treat as other: text/javascript” will create the proper MIME content-type for the “file”.
Domino 6 generates a doctype declaration that claims the output is HTML 4. When a browser sees that, it is entitled to refuse files that don’t match the requested type, so a JavaScript file that is served as content-type “text/html” may not be loaded. (IE will load the file in “quirks” mode; Mozilla-based browsers will not.)
If the code doesn’t need to be mutable – that is, if none of the code text needs to be computed at run time – then creating a JavaScript script library would be the way to go, or, if you have a large existing file (like a DHTML menu or a datepicker widget or some such), then including the file(s) as File Resource and setting the correct MIME type on the resource properties dialog is also a good solution.
(The image resource trick was an R5 way of getting around file limitations since there was no way to include a file resource “legally”.)