What Javascript libraries can you recommend for syntax highlighting <code> blocks in HTML?
(One suggestion per answer please).
|
Anyone know of a JS library that will allow me to syntax highlight a code block, then highlight line-level diffs? For example, in a subversion diff, I'd like to highlight ... |
Duplicate
Why don’t self-closing script tags work?
I'm writing an ASP.net page, which have some Javascript code in JS file for client-side authentication.
While using this code ... |
I have the following javascript snippet, which fails to load due to a missing ; before statement before thr declarion of url withing searchUserInfo.. I have double and triple checked this ... |
Where can I find a simple JavaScript based HTML syntax highlighter?
Simpler is better, and I don't need any line numbers or tricks, just added colors.
If it is the same colors as ... |
I have a code that is a mmix of html and js. I cannot get it correct.
location.description + '<br><a href="javascript:void(0);" onclick="showStreet;">ShowStreet </a><br>'+ location.lat + '<br> + location.lng
Can anyone help me ... |
Here is my code:
var divarray = document.getElementById("yui-main").getElementsByTagName("div");
var articleHTML;
var absHTML;
var keyHTML;
var bodyHTML = [];
for( var i in divarray) {
if(divarray[i].className == "articleBody"){
...
|
|
I'm having an issue where I'm trying to update the background gradient of an element with JavaScript based on values I specify.
I tried this route:
elem.style.backgroundImage = '-webkit-gradient(radial, '+x+' '+y+', 0, ...
|
when i copied this code from page error found that there is syntax error in this line in dreamweawer.
<a href="javascript:ajaxpagefetcher.load
('bob','sub/content2.htm',false,'',['page.css'])">Load Content 2</a>
Please suggest answer..
thanks
|
I have this:
var targetTitle = targetElement.getElementsByTagName('title').item(0);
Am i passing a plain string into targetTitle? or what am i passing exactly?
Which element would be item(1), item(2), etc... in here:
<title>title1</title>
<title><title2</title>
Does it just look for ... |
I have an external js file which I am creating a tag in.
Problem is I don't know how to use the quotes if I am to add an onclick event to ... |
Using emacs built-in JavaScript mode or SteveY's js2 mode, I get great syntax coloring of JavaScript in a *.js file. Is there a way to get good syntax coloring of ... |
insertText is java script that accepts two string paramters
I need to pass two strings
first parameter:
<img src="
second
">
I just cant figure out how to pass double quote as parameter
This works
<a onClick="insertText('<em>', ...
|
Indentation is all wrong. Any help?
I specifically use the following settings for javascript:
au FileType javascript set foldmethod=indent foldlevel=0 tabstop=2 softtabstop=2 shiftwidth=2
How can I tell vim to identify a particular ... |
I'm trying to understand how SyntaxHighlighter works. I've downloaded the source code, and seeing it, but since I know the elementary Javascript, so I'm facing difficulty understanding it. Few ... |
I am using the Syntax highlighter library to display code on a webpage. I would like to highlight certain sections of code in response to various events on the ... |
Possible Duplicate:
Syntax highlighting code with Javascript
Hi,
I am building a help documentation (html). I need to color code snippets of html code. I have no ... |
I'm trying to implement prettify.js in the same way as this fellow here.
However it's not working. I copied his javascript from his page source to make sure ... |
this is the error I'm getting from my IDE:
Error: Attribute "checked" not allowed on XHTML element "a" at this point.
From line 66, column 1; to line 66, column 70
<a href="javascript:chooseStyle('none', 60)" ...
|
I'm working on some native JavaScript (not my forte.. at all) and am not seeing the result of my function. I'm sure I've got a syntax error in here somewhere. Can ... |
I am not new in programming so my question is very serious.
1. Does anyone implemented code editor for webpage similar to the VS.Net webpage design + source editor?: I'm interested in ... |
I am a JavaScript newbie. I have the following code and it is behaving very strangely. What it is supposed to do is originally set the background color to red, ... |
The following code works for firefox, but shows error in IE.
document.getElementById('zip_container').style.borderLeft = '1px solid #D9D9D9;';
where zip_container is a div.
Can anyone suggest anything on this.
|
I'm looking for the webkitTransition object reference here
function spawnAnimation(what){
//sets the moving element
var moveingEl = document.getElementById(what);
//gives temp transition ...
|
After researching this issue for a couple of hours, I found that one of the most efficient ways to toggle a page element's display (in HTML) is to do something like:
// ...
|
I get this error: "missing ) after argument list" from firebug running this script. I attempted to us /' to nest the parameters in my window.open equation. Can anyone see what's ... |
Check out this HTML-page: http://ecmazing.com/wtf.html
In Chrome and IE9 an Illegal token / invalid character error is thrown.
The source code of that page:
<!doctype html> ...
|
Well, the green question mark does not go with my website color scheme. How do I change/remove it? You can see it here: http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html
Thanks!
|
Not sure what is wrong with this code. I keep getting the following error:
“Syntax error”
“Object Expected” : ''style.cssText' is null or not an object"
This is ... |
I'm just posting my entire page to prevent confusion. I've stared at each link and checked the folder for the files. it all seems to be there. what's not working? very ... |
Possible Duplicate:
Setting CSS pseudo-class rules from JavaScript
I have this HTML code:
<a href="#language" id="tabA">Language</a>
This javascript will change the color of the text however also :link ... |
(just started JS 2 weeks ago) -- this is also my first time posting here, if my post isnt following the proper template let me know and Ill fix it .. Thanks so much for taking the time to check this out in advance Im trying to make the first ul tag in the each slideMenus[] array index values have a ... |
|
They can be used together, but the script required a unique ID. IDs are unique whereas classes are not. Sometimes you want some CSS rule/script to apply to a set of elements, so you use one class for all of them, but you also want to refer to a particular element for some rule and giving a unique ID makes sure ... |
|
Hmm Think I have solved the problem to what I posted before. Just used self.mirror.replaceSelection(myvar) Now the next problem, I want to incorporate some form of ajax save so it allows for quick easy saving of the files being edited. Problem with this is codemirror replaces the id tag of the textarea so I can't use it with ajax. So tried ... |
Dear forum people, I am working through the book jQuery, Novice to Ninja. at page 88 i saw a piece of code that does not seem logic to me: They want to set css property 'width'. i see in the code: divTwo.css('width', divTwoWidth + 'px'); earlier in the book i learned that if you want to set css properties, i should ... |