javascript

Why does CodeMirror not work on Ipad ?

Greetings, http://marijn.haverbeke.nl/codemirror/jstest.html works on Safari on PC, but not on an Ipad. Which is a shame, since I wanted to use it for an app. My question is not only why does it not work, but how should I go about analyzing things that break on Ipad Safari ? T. ...

Is There A Central Repository of Javascript Information?

For example, if you want information of PHP functions, you can go to http://www.php.net/ . If you want information of Perl functions you can to to http://www.cpan.org/ and/or use perldoc. If you want information on Java you can go to http://java.sun.com and/or use javadoc. However, if you want information on Javascript methods/functions ...

How to select all child elements of specified control using jQuery

I have a <table id="myTable"> with a number of child elements: <tr><td> <span class="mySpan" /> </td></tr> <tr><td> <span class="mySpan" /> </td></tr> <tr><td> <span class="mySpan" /> </td></tr> How to select all this spans using jQuery? ...

JavaScript Keycode 46 is DEL Function key or (.) period sign?

Im writing some logic in JavaScript using jquery, where i must check the input content against a REGEX pattern ex: "^[a-zA-Z0-9_]*$" //Alpha-numeric and _ The logic is almost done, i just have a little problem filtering the function key DEL, my logic goes like this: var FunctionsKey = new Array(8, 9, 13, 16, 35, 36, 37, 39, 46); fu...

A viewController is a 'view' or a 'controller''??

Making progress in my understanding of Objective C but am still somewhat 'stuck' in conceptualizing what a 'ViewController' is. Coming from java-ecmascript based languages, I understand a view as being the class or template associated with any object you see or interact with (on the display list). And the optional controller, interacts ...

How to pass a reference to a string in JavaScript?

Maybe a closure is my solution? Not exactly sure how to pull it off though. The code is set up like so: var globalVar = ''; var globalVar2 = ''; function func() { if (condition) func2(globalVar) else func2(globalVar2) } In func2() I cache some HTML in a main container into the appropriate global variable that I pa...

XML DOM Manipuation

Hi, I am new to XML and have been trying some simple examples and they work fine. I want to do something like the following, but I am not able to figure out how to go about doing this. I have a HTML web page, where the user types in some data in an input field. I want to take that data, parse it to create an XML string, and the app...

getting the names of elements in JS/jQuery

I have some checkbox inputs like so: <input type="checkbox" name="1" class="filter"/> <input type="checkbox" name="2" class="filter"/> ...etc... I'm trying to write a function where any time a checkbox is selected, it generates a string with all the names concatenated. Here's what I have so far: $('.filter').click(function(event){ ...

Add jQuery colorbox plugin to a dynamically created element, extra problem.

I saw the answer of a question: http://stackoverflow.com/questions/2443490/add-jquery-colorbox-plugin-to-a-dynamically-created-element Solve part of the problem, works fine, but when I click for second time, it doesn't work. When I try to click for second time an error displays: $.fn.colorbox is not a function. How can i correct that er...

Google Chrome Extension Remove Element

I am trying to remove an element from a div on a third party website. Such as <div id="full_size_photo"> <img src="img1"> <img src="img2"> </div> var imageDiv = document.getElementById("full_size_photo"); imageDiv.removeChild(imageDiv.childNodes[i]); imageDiv apparently has 5 children? :S When i is 1 img1 is removed properly....

Handle an event with LinkButton

Hi, I have a LinkButton click event in asp.net 3.5 that I must assess whether a value exists and return a alert. I have no idea how you can do. I think we need to Ajax Can someone help me Thanks ...

Bing Map ShowInfoBox() always shows up in the center of the map?

The javascript code is attached below. Two push pins are added to a Bing map. When they are hovered, the description is shown next to the pins. Two buttons are added and ShowInfoBox(shape) is called on the click event. When the buttons are clicked, for some reason, the Infobox always pops up from the center regardless where the pushp...

Social Graphing application - help/collaboration needed

Hello my fellow Web Developers. It seems I have been charged with the tall task at my new job of creating an application that would track (on a kind of "super-aggregate basis") a combined aggregate of SEARCH STRINGS (assumedly via Google), SOCIAL MEDIA MENTIONS (Twitter mentions, Facebook mentions, blog mentions,etc), and NEWS POSTINGS (...

How to check for both null and undefined in js?

Is it possible to check for both null and undefined in javascript? if(_var == null || _var == undefined) { } ...

Can I use T4 template features to generate C# classes from javascript class definitions?

I have a javascript based library and would like to generate some C# classes for it. Unfortunately, I do not know T4 at all, so I may not have included information you need to answer this question. please comment, and I will edit as needed. Thanks! ...

java script is not working

i am comparing password and confirm password through java script.my code- function validate_form(thisform) { with (thisform) { if (validate_required(password,"<b>Error: </b>Password must be filled out!")==false) {password.focus();return false;} else if (validate_required(cnfpassword,"<b>Error: </b>Confirm Password must ...

What's wrong with this javascript? Array not defined

What's wrong with this code? var divarray = document.getElementById("yui-main").getElementsByTagName("div"); var articleHTML = array(); var absHTML; var keyHTML; var bodyHTML = array(); var i = 0; for ( var j in divarray) { if(divarray[i].className == "articleBody"){ alert("found"); articleHTML = divarray[i]; break; } bodyHT...

Detect the file size of a link's href using JavaScript

Hi, Would like to write a script to detect the file size of the target of a link on a web page. Right now I have a function that finds all links to PDF files (i.e. the href ends with '.pdf') and appends the string '[pdf]' to the innerText. I would like to extend it so that I can also append some text advising the user that the target ...

This javascript works in every browser EXCEPT for internet explorer!

The webpage is here: http://develop.macmee.com/testdev/ I'm talking about when you click the ? on the left, it is supposed to open up a box with more content in it. It does that in every browser except IE! function question() { $('.rulesMiddle').load('faq.php?faq=rules_main',function(){//load page into .rulesMiddle var rul...

Register click via javascript on flash without wmode in iframe(cross-domain)

I'm currently coding counter system and have spotted one problem with flash banners without wmode attribute at all, loaded via iframe from another website. Works only mouseout event. The problem is, that i can't catch click event on those banners. Is there any solution? Thanks. ...