javascript

How to use Java Script in Excel macros?

I am not a programmer and have a very very limited knowledge about both VB coding and Java scripting. I have a software which can be currently run through a Java script. The software does some caluculations and saves the result file in a folder. I just want an example of Excel macros which could run this Java script, this way I wont have...

jQuery datePicker plugin loading problem

Hi, I'm trying to use the following plugin for date picking: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html And I'm trying to use the code from the first demo but I get an error that jQuery is not defined (last line of the plugin, where the function is closed). I haven't used jQuery before so I'm hoping this is...

Getting Index of Current Item in JCarousel

I am attempting to get the index of the current item in a JCarousel so that I can display the current position within the Carousel to the user. For example, 'Photo 5 of 6'. How can I do this? EDIT: Sample of the end product: ...

Listexpander not working

my website the list expander is not working. I think it might be because I changed the CSS, but I cannot figure out how to make it work. Sorry the url is [http://hpcommtoolkit.com/Communication%5Ftools.html%5D%5B2%5D not the original. [2]: http://hpcommtoolkit.com/Communication_tools.html ...

Duplicate JavaScript without a debugger statement?

I have and ASP.NET 3.5 page where I need to debug some JavaScript code. function checkAll(isChecked) { debugger; var dataGridElements = document.getElementById('" + DataGridSearchResults.ClientID + @"').getElementsByTagName('input'); for (var i = 0; i < dataGridElements.length; i++) { var e = da...

Custom save prompt on unloading page?

I'm working under asp.net and I wonder if is possible to display a custom save prompt (lets say a div with styles, a message and some buttons) when the user is trying to leave the page. I've seen the onunload and onbeforeunload js events. The onunload event seems to does not work for my purpose, because I display the message but I can't ...

Looking for web-based graph editing framework

Does anyone know of a web-based framework for interactively editing graphs (nodes and edges)? Flash or Javascript is fine. I'm looking for something like GEF in Eclipse, or JGraph, or the NetBeans graph framework. Thanks! Just to be clear, I'm interested in editing tools for mathematical graphs (nodes and edges), not charting tools. ...

Get a #link to not refresh the page?

Is there anyway to get a link to another part of your page (<a href="#link">) to not refresh the page? Some times it will not refresh the page, and other times it will. This is a problem as i also have that link doing some javascript changes to the page onclick, which are then discareded when the page is refreshed at the same time. Any ...

Firefox extension to create a new icon or replace existing icon in the location/address bar

I want to create a Firefox extension that creates a new icon in the address bar or replaces the existing one with the one specified in the extension. And then, add some javascript to display this custom logo only when the user is viewing a particular domain. If this is not doable for the location/address bar, displaying the logo on the...

Javascript Member Functions Out of Scope

I have a class that creates an anchor object. When the user clicks on the anchor I want it to run a function from the parent class. function n() { var make = function() { ... var a = document.createElement('a'); a.innerHTML = 'Add'; //this next line does not work, it returns the error: //"this.add_but...

"too much recursion" error with live handlers in jQuery 1.3.2

This question is similar to my last question about "too much recursion" errors in jQuery, but involving live handlers. I have one element within another. Both of them have custom event handlers with the same name. The outer element has a traditional handler and the inner element has a live handler. When I try to trigger the event on the ...

How do I use JavaScript to grow an HTML form?

I'm creating a simple web application with which a user may author a message with attached files. That "attach additional files" link does not yet work. It should add an additional file input control to the form each time it's clicked. I need a JavaScript method addanotherfileinput() to replace the clicked anchor: <a href=...

Code isn't compatible with IE?

$(document).ready(function() { var url = document.location.toString(); $('.tab').click(function() { if($(this).is(".active")) { return; } var classy = $(this).attr("class").split(" ").splice(-1); var innerhtml = $('.content.'+classy).text(); $('#holder').html(innerhtml); $('.tab').removeClass(...

Easy way to replicate web page across machines?

I am trying to replicate a browser page to another browser on another machine. I basically want to reproduce a page exactly how it appears to a customer for viewing by the website owner. I have done this before using some impersonation trickery, but found that it would throw the session state out of wack when the site owner would switc...

Checking to see if a frame exists with jQuery

I have found I can do the following: if($('#notice', parent.frames['header'].document).length>0) { alert("It is here!"); } to check for an item in another frame. Is there a way to find out of the frame exists? Specifically I am looking to see if parent.frames['header'].document is there. Is there a reliable way of doing this? Updat...

How do I pass form elements to a javascript validation function?

I have a form that lists users, and for each user there is a drop down menu (2 choices: waiting, finished) and a comments textbox. The drop down menus are each labeled "status-userid" and the comments textbox is labeled "comments-userid" ... so for user 92, the fields in his row are labeled status-92 and comments-92. I need to validate...

What is cross browser support for JavaScript 1.7's new features? Specifically array comprehensions and the "let" statement.

https://developer.mozilla.org/en/New_in_JavaScript_1.7 A lot of these new features are borrowed from Python, and would allow the creation of less verbose apps, which is always a good thing. How many times have you typed for (i = 0; i < arr.length; i++) { /* ... */ } for really simple operations? Wouldn't this be easier: [/* ... ...

Can this JavaScript be optimized?

This JS will be executed on pages with a lot of fields. Can you see anyway to improve the speed of this code? If so, can you explain what you found? var _TextInputs = null; function GetTextInputs() { if (_TextInputs == null) { _TextInputs = jq('input[type=text]'); } return _TextInputs; } var _Spans = null; func...

variable declaration in ajax

Hi I need to write an ajax function to reload the content in a div of my Free marker tool page the Div contains a question with yes or no radio buttons and when the user picks yes and click the submit button the page should reload and as I am very new to ajax I wrote something like this PLEASE LET ME KNOW IF THE FORMAT I WROTE IN CREAT...

Internet Explorer and Tinymce error

It's working with Firefox, but I have a problem with Javascript tinymce in Internet Explorer. You can see it here: http://kameleo2.bluesys.ch/fr/produits.html by clicking on the "Mode édition" button and selecting one of the paragraphs. Can you tell me what the js error means, and maybe where it comes from or what causes it? ...