Hi, I am trying to incorporate great syntax highlighting into an APP net page but every time there is an error saying 'DP' in it. Undefined '
I think before downloading the script it goes to the calling section, how can I ensure that the file gets loaded before continuing?
Thanks
DORON
EDIT: This is the code that I use in my aspx file, it works fine as a regular HTML, But when I try and use it in an aspx file it is 'dp is undefined'
& lt; Link type = "text / css" rel = "stylesheet" href = "App_Data / styles / syntaxHighlighter.css" & gt; & Lt; / Link> & Lt; Script type = "text / javascript" src = "App_Data / script / shark.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "App_Data / script / shBrushCpp.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "App_Data / script / shabrash CSARP.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "App_Data / script / shabrashcss.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "App_Data / script / shabrashjava.js" & gt; & Lt; / Script & gt; & Lt; Script Type = "Text / JavaScript" src = "App_Data / Script / ShabraszScript.JS" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "App_Data / script / shabsff.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "App_Data / script / shabrash pithon.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "App_Data / script / shabrasharub.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "App_Data / script / shabrasache.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "App_Data / script / shabrxxax.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Window.onload = function () {dp.SyntaxHighlighter.ClipboardSwf = 'http://aaron-mueller.de/vendor/dp_syntax_highlighter/Scripts/clipboard.swf'; Dp.SyntaxHighlighter.HighlightAll ('code'); } & Lt; / Script & gt;
Actually, if you put the script in the correct order, then everything works fine Should:
& lt; Script src = "... / highlighter.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Highlighter.doAnything (); & Lt; / Script & gt; But it may be that Highlighter did & lt; Script & gt; Tag it with tags, and in this case Jacob needs help solving: Do everything on document load
Either
Window.onload = function () {highlighter.doAnything ();} event or (if using JQuery)
$ (function ( ) {Highlighter.do Anything ();});
Comments
Post a Comment