javascript

ExternalInterface.addCallback does not work right

I have js code: function onFlashReady() { sendToAS("sit"); } function callJS(value) { onFlashReady(); return "Hi Flash."; } function thisMovie(movieName) { if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieName]; } else { return document[movieName]; } }...

Date validation in ExtJS

Hi, I have a datefield in a form like this: { xtype:'datefield', name:'order[date]', id:'dato', format:'d-m-Y', allowBlank: false, cls:'input_single', emptyText:'dd-mm-yyyy', minValue:new Date().add('d',-1), ...

Javascript - Extract text from a page then build an array with it

I have a table of data that I want to grab text from, stick into an array (and then use with Google maps). The table looks like: <table> <thead> <tr> <th>One</th> <th>Two</th> </tr> </thead> <tr class='bar'> <td class='name'>Bob</td> <td class='number'>12345</td> </tr> <tr class='bar'> <td clas...

jQuery Slideshow + Click to Enlarge (LightBox and ColorBox)

Hello! The Question: I would like to use the slide-show I currently have in place BUT with the option of clicking the image to enlarge. Enlarge would use a lightbox (you know, all fancy pants style) Here is the page I am working with as an example: http://newsite.702wedding.com/valley-of-fire-weddings.aspx The slide-show is on the ri...

jQuery: Using a Time Delay in an Each Iterator?

I'm trying to create a carousel effect that automatically cycles through each pictures every 3 seconds. $(".headline_img").each(function(intIndex){ setTimeout($(this).show(),3000); }); The timeout delay is not working. This shows all of the images instantly as soon as the dom loads. It's like its ignoring the setTimeo...

Set iframe height to that of internal content (on same domain)

I have an iframe embedded within my page - it's just part of my page, not the whole thing. I am reloading the iframe dynamically and want it to resize according to the height of the content within it. The content is on the same domain, so (hopefully?) no need for a solution as complex as that given in Resizing an iframe based on content...

How to call a JavaScript function on page load

How can I call a JavaScript function on page load without making <body onload='callFunction()'> i want to check when loading the page what is the purpose of using that page, if for addition then ok , if for edition , there will be data come from server to be displayed in that page, so i want to check the request each time page is lo...

Jquery - Customizing the colorbox plugin

I'm using the colorbox plugin for modal popups. It's working nicely, but there's a main thing about it that seems wrong. I have a form that pops up, and on submitting (or clicking a link) in the form, this might open another "colorbox" modal. It works smoothly, but there's one thing that bothers me. As it is, colorbox seems to wait unt...

adding on ?v=1 to urls

As seen in the code from http://html5boilerplate.com/ (ctrl+f "?v=1") What does ?v=1 do exactly? It's tacked on to the external css and js urls. ...

Contenteditable reset text color after foreColor has been used without resetting other styles

Changing the text color of text in a contenteditable div is easy - simply called document.execCommand("foreColor",false,"#FFF") to change text color to white. However, I cannot find a way to reset this color back to its default value (or to the value of the parent element). document.execCommand("removeFormat",false,null) works perfectly...

Web charting libraries for mobile, our own research

We are looking for a nice javascript-based library for a web charting application we have been asked to do. The charts will be accessible and should actually be nice to interact with via mobile devices (iOS, Android, and the like). The user will be able to drill-down into some datasets, so the snappier (both processing graphics and loadi...

Text Editor(ckeditor) not working inside my DIV box

Hi I have a div box that opens on my page and then loads a html file which contains CKeditor to deal with the text area. The problem is that if I view the html file in my browser everything works well and I have all the editing options. When I use it in my JS script I get nothing. Can anyone help me please ? The JS code that does this ...

Run javascript file in Netbeans/Eclipse?

Is there a way to run a javascript file directly in Netbeans or Eclipse? I feel it's time consuming to fire up a terminal, browse to that file and run it with node all the time. ...

Draggable, resizable and movable iframe

I can't find any draggable, resizable and movable iframe on the web. Can anybody help? jQuery would be better. ...

jQuery .attr() and value

I want to make the following use .attr(); selectbox.options[selectbox.selectedIndex].value sadly, selectbox.options[selectbox.selectedIndex].attr("value") is not the same, and seems to defeat the purpose of the .attr altogether. My main question is: How should one use nested .attr()s? Muchos gracias mi amigos ...

Show all object methods in a list in Chrome console?

I really love the Chrome console because it autocompletes all the object methods for me. But it only shows one at a time and I have to press TAB to step to the next one. Is there a way to show a list of all the autocompletion object methods? ...

jGrowl sticky not working in IE8

I'm using the jGrowl jQuery status-message plugin to display a sticky message on page load, and it works perfectly on all browsers except Internet Explorer 8. In this browser, there remains a small block, about 2 lines high but with no text, even after closing the sticky message. It does not have a close button, or anything, for that mat...

Best way to store all javascript snippets?

What is the best way to store all javascript snippets? jsFiddle seems nice! But one cannot create an account. Here is my dream solution: I create an account. I type in all my snippets. I run my snippets to see the results and I save them. I share them with others. I can access them where ever I am. Is jsFiddle the way to do this (...

window.location + manipulating string url from window.location.href

Hi, I'm trying to get my facebook graph oauth setup using javascript's window location methods. Here is my code so far: function fbLog() { var clientID = '11502353444318540727'; var redirecturi = 'http://google.com'; var clientSecret = '6987d02323442423231f8b9da767b060e9'; var codeURI; $('#fbLogin').click(function() { window.locatio...

Unable to access a JSON object as I would expect

I do an ajax call: $.ajax({ url: '/foo/getData', dataType: 'json', async: false, success: function(data){ lat = data.project_x; lng = data.project_y; zoomin = parseInt(data.mapzoom); console.log(data); } }); and return: [{"id":"3","project_x":...