javascript

Is there a tool like Firebug available for IE

I am looking for a tool like Firebug besides Firebug for IE and Developers toolbar. Thanks ...

silverlight webbrowser control InvokeScript error

I am running OOB silverlight application where I have a WebBrowser control but I am getting this error when I call InvokeScript:- Attempted to perform an unauthorized operation. Is it because it's OOB ? ...

javascript cookie problem

Hello, I am very new to javascript. Today I tried this function which I found on the Internet: function get_cookie ( cookie_name ) { var cookie_string = document.cookie ; if (cookie_string.length != 0) { var cookie_value = cookie_string.match ( '(^|;)[\s]*' + cookie_name ...

javascript dialogbox without opening page

I have to display dialog box from servlet but without opening new window. Below is code PrintWriter printWriter =response.getWriter(); String s ="<HTML><HEAD><TITLE>JavaScript Example</TITLE>"+ "<SCRIPT LANGUAGE=JavaScript>"+ "alert('File Uploaded');"+ "</SCRIPT>"+ "</HEAD>"+ "</HTML>"; printWriter.print(s); This code open d...

How to simulate clicks on <a href="javascript:dosomething(12345)">text</a> using python?

I want to simulate such clicks without controlling web browsers to do the job. I don't know much about javascript and actually don't know where to start. Any ideas? ...

jQuery /Javascript - json to string variable dump

Is there a quick function to covert json objects received via jQuery getJSON to a string variable dump (for tracing/debuggin purposes)? ...

Javascript: How to turn the time (stored as a fraction) into a readable string?

I have the time stored as a fraction (done so it can be displayed on a graph), e.g. 15.5 is 3.30pm and 23.25 is 11.15pm. I need to turn those numbers into strings in the format HH:MM:SS. Is there a simple way of doing this? ...

File Upload and Cookie

Hello I am working on multi step registration form and it contains file uploads in the intermediate step . I am storing each value in the form in the cookie to work it with browser back button and and reset the same in the final form which i want to post at the. But how to store the file upload in the cookie so that i can set it when use...

Should I load javascript in an IFrame embedded in an ASP.NET page?

Is the best approach to loading javascript files to put them in an IFrame and then embed the same in asp.net pages? I have read somewhere that this will help to boost page-loading times. ...

Check if Selection Changed in OnClick event

Note: The answer marked as the answer, answers the questions in the Title. However, my underlying problem, using type ahead dropdowns, is solved by moving to IE8. I have a drop down list that when I CLICK a NEW selection I want to cause a postback ("this.form.submit()") But only if the click on the dropdown list just changed the selecti...

Is progressive enhancement a current issue anymore?

There are couple of things I hear in defense of progressive enhancement. Javascript is off or not available. According to W3School's Javascript statistics, 95% had Javascript enabled January 2008 (2.5 years ago). The trend, based on those stats, seems to be that Javascript enabled browsers are on the rise. Heavy AJAX adoption has probab...

Parsing valid url from long string with pure js or jquery using regex

Hi all, i get a longString from object's onclick value var longString = String(this.onclick); output like below; function onclick(event) { window.location.href = "index.html?q1=v1&g2=v2"; } i want parse that like below; index.html?q1=v1&g2=v2 how can i do this with pure js or jquery which works with all browser? Thank you fo...

.checked=true not working with jquery $ function

hi all... i want to select a checkbox when a button is clicked. <form action="" method="post" id="form2"> <input type="checkbox" id="checkone" value="one" name="one" /> <input type="button" value="Click me" id="buttonone"/> </form> when i tried the following, the checkbox was not getting selected $('#buttonone').click(functi...

jQuery Ajax call No element found issue

I am getting a javascript error on firefox 3.5, when trying to call an ajax method. Please find the error below: XML Parsing Error: no element found Location: moz-nullprincipal:{1a2c8133-f48f-4707-90f3-1a2b2f2d62e2} Line Number 1, Column 1: ^ this is my javascript function: function Update(Id) { $.ajax({ type: "GET", ...

rotating a product image with javascript only

I just browsed the apple iphone 4 gallery and stumbled upon the 360° view of the new iphone (see http://www.apple.com/iphone/gallery/, click on the 4th image from the left in the thumbnails view). First I thought it would be a flash movie which lets you rotate the iphone image, but as I inspected it with firebug I found out thats just pl...

Jquery .Get() pulls NULL in Internet Explorer

Hello everyone, I have a problem with an AJAX call in JQuery. It works on Chrome, FF, and Safari, but not IE. In fact in IE nothing happens at all, no errors, no data loaded. Here is the code: $(document).ready(function() { $.ajaxSetup({ cache: false }); $.get("ShoppingCart2.aspx", { }, function(data) { //...

remove selected attribute of first selected element in select tag?

i have a multiple select tag, look at script please <select multiple="multiple" size="5" id="cities_select"> <option value="1">city1</option> <option value="2">city2</option> <option value="3">city3</option> <option value="4">city4</option> <option value="5">city5</option> <option value="6">city6</option> ...

How to request from a different server URL using JavaScript

I need to send some of my data into another server. Actually to post into facebook. So here i already have an API which works by an URL. So if i set the parameters from the URL and if i try it in web browser it works. But when i try it as a AJAX call it do not work. (Because its not hosted in the same server as my web pagers are). Is t...

Embed text into PNG

I'm looking for a tool that'd let me embed json-formatted information inside a PNG -file. This far it's been quite quiet. Do I have to write it myself? I'd be especially interested of doing it with javascript. Into an image I extract from a canvas with toDataURL -method. ...

Java application scripting

Whats the fastest/best scripting language/API that is available that can be integrated into Java applications. Is there any Java bindings for Google's v8 JavaScript engine? Defining fastest as in raw processing speed, e.g. how many times a script can be run in a second using a relativity high number of language features. Defining best...