It had to happen some day….

In the project we’re currently working on, we have a masterpage with a JavaScript powered menu. In this masterpage, a JavaScript function with the name HideUnhide was defined to toggle the visibility of parts of the menu. 

Everything worked fine until we opened a page containing a webpart rendering a SharePoint DateTimeControl. After some investigation, it appeared that the DateTimeControl is referencing a script file with the name datepicker.js from the \12\TEMPLATE\LAYOUTS folder.
As you’ve probably already guessed it turned out that this script file also defines a function with the name HideUnhide. Renaming our MasterPage function obviously solved the issue.
There are lots of .js files in the 12 hive so there’s always a chance that a javascript function with the same name as the one you’re about to implement already exists. 

Geef een reactie

Jouw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *

*

De volgende HTML tags en attributen zijn toegestaan: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Categories

  • Tags

  • Blog Authors

    Amy
    anita
    Anneke
    Danny Burlage
    Dennis Vendel
    Freek Berson
    Gerard
    Iris
    Jasper Oosterveld
    Jean-Claude Chan
    Jorn
    Lab Chicks
    Luc Joziasse
    Maarten van Noort
    Maarten Wijsman
    Marlon
    Martijn Bellaard
    Natasja van Doorn
    Paul Pascha
    Peter Heuvelman
    Rick Slager
    Robert van Son
    Roeland Jimenez
    SanderZ
    Sjoerd Schudde
    Stefan van der Wiele
    Tim Heuperman
    Wortell
  • Archief