PermaLink Use JavaScript control and dojo widgets: plot thickens06/05/2009 11:30 AM
None

I did some testing and narrowed down what is happening. When you select the new Use JavaScript Control Display setting for a rich text field, Domino automatically adds dojo includes to your HTML Header. Domino's code is in blue. The code I'm adding via my own $$HTMLHead field is in green:

<style type="text/css">
@import "/domjs/dojo-1.1.1/dojo/resources/dojo.css";
@import "/domjs/dojo-1.1.1/dijit/themes/dijit.css";
@import "/domjs/dojo-1.1.1/ibm/domino/widget/layout/css/domino-default.css";
</style>

<script type="text/javascript" src="/domjs/dojo-1.1.1/dojo/dojo.js" djConfig="locale: 'en-us', isDebug: false, parseOnLoad: false">
</script>

<script type="text/javascript">
dojo.registerModulePath('ibm', '../ibm');
if (location.replace == null)
location.replace = location.assign;
</script>

<script type="text/javascript">
dojo.require('ibm.domino.widget.layout.DominoRichText');
</script>


<script type="text/javascript" src="/domjs/dojo-1.1.1/dojo/dojo.js" djConfig="parseOnLoad: true"> </script>
<style type="text/css">
@import "/domjs/dojo-1.1.1/dijit/themes/tundra/tundra.css";
@import "/domjs/dojo-1.1.1/dojo/resources/dojo.css"
</style>

My guess is the dojo.registerModulePath() function is cancelling out the dojo stuff I include.  I tried to register the dojo stuff again using the following, to no avail:

<script type="text/javascript">
dojo.registerModulePath('dojo', '/domjs/dojo-1.1.1/dojo');
dojo.registerModulePath('dijit', '/domjs/dojo-1.1.1/dijit');
</script>

I found some more info on registerModulePath() here and here, but I admit I have no clue on what I'm doing.  I need to submit a PMR on this.

(I converted the HTML/Javascript using this utility.)


Comments :v

1. Stephan H. Wissel06/05/2009 12:34:50 PM
Homepage: http://www.wissel.net/


Maybe you are barking up the wrong tree. What happens: Dojo is loaded in the first statement. The browser sees the second statement and does: "Aha smarty boy, I have that already" and moves on. Anyway the difference is the parseOnLoad. Remove that line and simply register a small onLoad function with the page that executes the parse statement.

See: { Link } with cut & paste code.
Hth
stw




2. Stephan H. Wissel06/09/2009 10:19:42 AM
Homepage: http://www.wissel.net/


Did it work?




3. Michael Sobczak06/10/2009 09:40:03 AM
Homepage: http://www.punkdbynotes.com


Hey Stephan,

Haven't tried it yet. Had some fires to put out the last couple of days. I'll definitely check this out today.


Thanks!

- Mike.




Credits
NuTechs Powered by Domino
Search
Calendar
March 2010
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Monthly Archive
Get Real, Detroit!
Real Detroit Weekly
SWARM
Service
With
A
Rapid
Motion


-- old Rally's Hamburgers credo
Lotus Domino ND6 RSS News Feed RSS Comments Feed Podcast Feed Geo URL netcraft RSS Validator Lotus Geek Chris. A. Brandlehner Open Notes Picture Database OpenNTF CoComment Integrated BlogSphere
By Category
The BlogRoll
About
Contact Me
Contact me, Michael Sobczak, using this e-mail address:

my first initial my last name at Yahoo dot com
Recent Entries
No Recent Blogs
Powered by
Blogsphere