The Accidental Client Coder
Hands up if you've ever fallen foul of this little annoyance. You're working on a database in Designer 6 that was created in R5. You make a change to some of the JavaScript in the form only to find it has no effect at all in the browser. After trying again and again and adding a few alert()s here and there you remember what it is. In Domino 6 the form's events are duplicated for the Web and the Client. By default, when you edit some JavaScript, you are editing the Client code.
This only happens when you open an R5 database in Domino 6. If you create a new database in Domino 6 and add JavaScript to an event it is tied to the Web by default, which is good, for me at least
This isn't a bug of course. It's just an annoyance that catches me out almost all the time. The clues are there, I'm just too stupid to see them. You can see in the shot above that the JS Header is stripy, whereas the onload event is yellow. Stripy tells me there's code in both the Web and Client sides. Not only this but there's a drop-down which clearly lists the client the code is for. A yellow circle denotes Web-only code and green is for Client code.
This isn't a "how rubbish is Domino" post. It's as much me admitting to being stupid as anything else. But am I stupid? Surely I'm not the only one who does this. It can't just be user stupidity. Some of it has to be that this has been badly executed. Surely!
On a lighter note I am sat here, in our worthless corner of the world, sipping tea through the gaps in my yellow teeth* reading this. Brilliant stuff. Thanks Watski. I love the stereotypes that different nations have of each other.
* I do love tea but I don't sip it. I tend to slurp or gulp it. My teeth aren't yellow, but then they aren't exactly dazzling either. They're a normal off-white. The food I eat isn't that bad. It's a mix of continental styles, with roast dinners and fish-n-chips reserved for the odd "treat".
1. Yep. I do this all the time. Very annoying and usually the last thing I remember to check (after restarting the browser, clients, http task etc..).
2. Bloody hell. An American who knows that Wales is a constituent part of Great Britain and not somewhere in England. Maybe I need to revise my stereotypical view of them!
Cheers. Great site.
JT
That 'gotcha' gets me too. What makes it worse is if you want to use a formula behind a web button - you switch to the client option to enter it as the web option is for javascript only.
Yeah, it sucks... I know we should notice it, but we had times that 3 developers were looking at the code, not understanding why changes were not reflected in the browser when suddenly I notice the "Client" option... And it happens again... and again... and again... this mistake is hard to learn :-)
this "gotcha" has gotten me more than once, too.
I'll join this band wagon too. This one gets me more often than I care to admit. :-)
Sorry to spoil the party, but I really only faced this problem once or twice in the beginning of R6 development. Keeping my fingers crossed. ;-)
But what did happen to me once (unfortunately when teaching a Designer course) was the following:
I demonstrated the "Common JavaScript" selection, entered some code for the client, then changed to "Web" and the programming pane was empty. I could effectively enter different code for Notes client and Web browser, despite of Designer telling me that it all went into "Common JavaScript".
After changing both events to client specific JS and then reverting to Common JS again, the problem was gone. Still a little worrying.
Deja Vu, I hope you didn't spent 3 hours putting alerts in like I did, and this was a week after my R6 update class. I can't say stupid, just old dog new tricks.
Never happens to me. I prefer using Page for my javascript. If i can, i use a 1 page for my html, 1 page for my javascript and 1 page for my CSS.
I find it alot more easier to debug and structure.
My only compliant is that the domino designer does not color code your comments in a page!
This one has bitten me more times than I care to remember. And it's a usability issue that could and should be addressed.
As for that Ohio project, ouch... hurray for free speech and all, but don't associate the rest of us Americans with the obnoxious few listed there.
Just a brief "me-too"! These things just drive me nuts, plus things like onLoad events that don't work on subforms, plus... oh whats the point? the list could be endless... Anybody fancy a top-ten list (complete with 0900/SMS voting scheme - no? can't stand those either!!) (end rant)!
our team too...a few of us were griping about it only yesterday
Following Jakes rule for some time now (don't let domino render the HTML) I stopped using design elements on forms to hold javascript and only use libraries or passthru HTML script on pages where function calls are visible at a glance. Saves all sorts of hassles. :-) Makes for less than attractive form markup, but it's far easier to track down where a change needs to be made and much easier to manage when you don't let the conveniences of the design client lure you away from a centralized code management model. Just my 2p.
This little annoyance has fooled me more than once! :-(
You could always change the colour of the script for Client and Web, that way you would have a larger prompt to remind you which you are programming in ...
Interesting how the neo-nazis are so indignant -- and so personally offensive. Obviously they are concerned with the merits of Bush and his re-election; no able to rebut with facts they resort to argumentum ad hominem trying to scream down any dissenting voices. It's a shame in the USA, where free speech is the cornerstone of society.
Oh, teeth gradually become more and more yellow with age: the dentine hardens and this makes the teeth seem less white. What they correspondents should be concentrating on is the crooked teeth of the UK, not the colour.
I read this blog from Jake a few days ago and thought "I have seen that before and I should remember that problem next time it occurs". Then this morning I was working on some changes to an application and I couldn't figure out why the browser wasn't showing my changes. After a half hour of trying, it hit me that I had a case of this problem. Even when recently reminded this can still get you!!!
OK, I'm feeling better now knowing that I'm not the only idiot out there!! :)