javascript

Extjs change fieldLabel after field is rendered. Any better solution?

I examined how ExtJs renders form's fields in dom. To change fieldLabel after field is rendered I find proper dom element and change its innerHTML; /** * Modifies field's label afrer field is rendered. * * @param {object} field * Some object that directly or indirecty extends Ext.form.Field * @param {String} label * New value for ...

Google Maps V3 StreetView not displaying on second setVisible() call

EDIT: Heard back from Google, they've confirmed this is an issue on their end. EDIT2: my contact at Google has informed me they've fixed this bug. I've got a troublesome bug using the Google Maps V3 API. If you set up a map, switch to streetview, close streetview, then reopen, the imagery appears blank (though the controls still displ...

JavaScript losing "this" object reference with private/public properties

I have the following error when running the page below: "this.testpublic is not a function" test = function() { var testprivate = function() { this.testpublic(); } this.testpublic = function() { console.log('test'); } testprivate(); } new test(); Apparently w...

Client review js overlay

When your construction inspector walks through a building they drop blue tape over all the nails that are hanging out of the wall and paint that's not done right. How do we do this with client acceptance of websites? Is there a tool like crazyegg that overlays your website and allows clients to annotate and mark bits that are out of whac...

Facebook JS SDK Syntax not recognized

I don't know why it's not finding the libraries I loaded for JS: <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head id="Head1" runat="server"> <link href="Content/Styles/Site.css" rel="stylesheet" type="text/css" /> <title></title> <script src="Content/js/jquery-1.3.2.min.js" type="text/javascript"></script...

Coupling/chaining multiple asynchronously loaded JS scripts (JavaScript) .

Problem description: I'm working on a project to take an existing JavaScript script and modify it to support being loaded asynchronously. If you don't know about asynchronous or lazy loading scripts but want to learn more read this. One of the first things our main.js script does is call our web-server (3rd party to our clients) to ge...

Jquery FullCalendar combining JSON and GCAL

Hello, I just download FullCalendar today and I've been trying to combine the JOSN calendar with the gcal. In addition to my JSON data i would like to show national holidays too, Can someone please tell me if this is possible or not. I've tried this and it's not working. thank you! $(document).ready(function() { var date = new Da...

Is it possible to submit JavaScript array along with form submission?

I would like to create a list-like form for a web application. Elements are added to, modified and removed from the list, and the user clicks "Submit" to send the list to the web application for further processing. I would like to have two INPUT fields that I can add data into, click an "Add" button, and the data is added to both the DO...

jQuery $.inArray() not working properly with array made with jQuery makeArray()

I created an date array using this: var holidays = ["7/24/2010","7/25/2010"]; var holidaysArray = jQuery.makeArray(holidays); and then testing to see if myDate (a date object) exists in the array: if ($.inArray(myDate, holidaysArray ) == -1) {....} However the test always return -1 even though myDate is one of the two days. I wa...

the link to the latest DOM specification

I read the latest DOM specification, which is under draft, that the new DOM model provides APIs for checking dynamically added event handlers. I couldn't find the link to that site and didn't find it using google. Does anyone has the link? ...

Storing Iframe src as a variable

In the options page of my Google chrome extension, the user defines a URL destination which saves to LocalStorage["dest"] Can't get the code to work in the popup.html file though <script type="text/javascript"> url = localStorage["dest"]; document.getElementById('site').src = url; </script> <iframe id="site"> </iframe> What am ...

"else" doesn't work in javascript function

I'm very new to javascript but I'm trying to make a checkbox that will copy the billto information into the shipto boxes. I have the checkbox with an onclick event, set up like so: <input type="checkbox" name="chkSame" id="chkSame" onClick="fncCheckbox()"/> same as customer info<br/> I get an error of "Expected ';'" on the Else line ...

javascript ? : notation

This is probably a dumb question, but... I found this snippet of code in my travels in researching JSON: var array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray; I'm seeing more and more of the ? and : notation. I don't even know what it is called to look it up! Can anyone point me to a good resource for this? (btw...

jQuery outside of a asp.net update panel

I have an asp.net page that is using and update panel and am including some javascript via a {script src=abc.js} tag. I have tried loading my javascript using both $(document).ready and $(window).load. Both fire on the initial load but fail to fire on an update panel postback. Is there anything I can wire up client side that would fire...

Javascript error in every browser except Firefox

I'm pulling my hair out over this. I have this bit of javascript that asynchronously fetches data for an events calendar. Basically when you click on a day of the month a little UI pops up and a text area gets populated with the data that gets retrieved. On this UI are two submit buttons: one to save changes, and one to delete the event ...

bold text in textarea

Hi, i'm trying to write a very simple wysiwyg editor, where users can simply add bold text, hyperlinks and bullets, after selecting part of the text.. actualy just like CKEditor. But as far as i know there is no way to add formatting to a textarea. So I would like to know, how do other wysiwyg editors like CKEditor solve this. ...

How do I remove the default Google Search Value from Google Search box?

I am trying to use a little jQuery to "hide" the initial value in a Google Search box when you click in the box and I am missing something. Here is the search box code: <div id="search_box"> <form action="http://mfrp.ehclients.com/search_results" id="cse-search-box"> <div> <input type="hidden" name="cx" value="0174257249261220415...

grab CSS value with Regex

Hi There I am hoping that someone can help me with this regex, I need to grab test2 and everything between { } .test1 {font-family: Arial, Helvetica, sans-serif; color: #42bf32; font-size: 14px; } .test2 {font-family: Arial, Helvetica, sans-serif; color: #42bf32; font-size: 14px; } .test3 {font-family: Arial, Helvetica, sans-serif;...

Handling authentication through AJAX?

This is a newbie question to AJAX experts: In case an unauthenticated user tries to post a comment to an article and send it to the server through AJAX, I need the remote PHP script to return... a 401 and a logon/password form which the user will fill and try again, or a 301 to redirect the user to a full-page logon/password form which...

Programmaticly make clicks on a webpage

There is a onmousedown event on a webpage. I want to be able to have this event called from my app and have the WebBrowser object move to that page. How can I achieve this? ...