javascript

JS function after page load..

How can I execute a JavaScript function after Page Load is completed? Thanks in advance. ...

Save value in PHP Session variable.

Hi, I have an html table which contains records, comes from mysql db. Each row also contains id (PK) wrt db table record. Now I want to save record id in PHP Session variable, when I click on a row. To do this I used onclick property for each row & call a javascript function with record id as function parameter & it works fine but how co...

is there any way to stream binary content with javascript

I am hoping to make an example using the developer build of chrome and being able to use subsonic to stream a binary audio file. So far I have not had any luck though. Granted my next option will be try to load in the audio files into windowStorage and toss some magic dust on them. Does anybody know a way to stream a audio file to the ...

Small bug when selecting text on focus

i have a input[type=text] containing the short url for a post. i want to select the short url so users can easily copy the short url into clipboard. i used $(".shorturl input").focus(function() { this.select(); }); but i noticed the 1st time it works fine then the next time it will blick (i see the text selected then deselected). ...

barcode scanner in JavaScript? Or plugin/extension

Hi All, I'm looking at writing a USB barcode scanner interface to a web application (offline app). By this I mean that the scanner will be on the client machine not server. So I was wondering what the best design would be. I know I could write an ActiveX object or native plugin into some browser but this is not ideal, does anyone kno...

Jquery - Flot, How can I only show points and not lines?

Okay to get started I am using Jquery-Flot to plot a radial graph I have found a plug in to create a spider graph see API here: http://www.jumware.com/Includes/jquery/Flot/Doc/JQuery.Flot.spider.html Now it works all nicely bar the fact I dont want to show the lines that connect the points. Usually with: points: { show: true}, lines: ...

Check Pending AJAX requests or HTTP GET/POST request.

How do i check if the page has pending AJAX or HTTP GET/POST requests? I use javascript and/or python for this checking. what i wanted to do is execute a script if a page has finished all requests. onload doesn't work for me, if you used firebugs net panel, you would know. onload fires when the page is loaded but there is a possibility...

How to inform if Javascript is disabled in the browser

I want to inform a user if javascript is disabled in the browser and tries to access my website.My information will be like:"Please enable javascript in your browser for better use of the website".So how to do this?Can anyone help me?My web site is based on ASP.Net with C#. ...

Java Script: mousestop event

For some feature, I am working on mousemove event. mousemove event listener is invoked a number of times with in a single linear mouse gesture that is not required. I need to implement a custom event that will be invoked when mouse will stop its motion. I have a guess that it can be implemented on top of mousemove with some delay feature...

keep JavaScript array variable during post-back

How can I keep the values of ;ctrlIDhdnImageSourceArrayJs,ctrlIDhdnElementsArayJsHidden during a web page life-cycle... "<script language = javascript> debugger; var ctrlIDhdnImageSourceArrayJs = '" + this.hdnImageSourceArrayJs.ClientID + @"';...

HTML5 localStorage: check if item isset

how can i check if an item is set in js? currently i am using if (!(localStorage.getItem("infiniteScrollEnabled") == true || localStorage.getItem("infiniteScrollEnabled") == false)) { // init variable/set default variable for item localStorage.setItem("infiniteScrollEnabled", true); } ...

Javascript: client-side webservice with <script> tag

Hi, I'm trying to implement sort of client-side webservice client. To get over the same server policy, i'm thinking of including the external page whose content I need to read via the <script> tag that can get cross-domain content. I have no control over the webservice being consumed, so i can't actually return javascript code (it's a ...

javascript error apostrophe

i have in my jsp a js function to open a popup, in this function I pass as parameter, this parameter is a message like this L'appareil est en panne but when i load my page i have a javascript. how i can i do before i load my page to do this* L''appareil est en panne ...

Can't show views every time when select value on drop down list

Select group <%=Html.DropDownList("GroupsDropDownLst", (IEnumerable<SelectListItem>)ViewData["GroupsDropDownLst"])%> <fieldset> <legend>Devices And Accessories</legend> <p>Devices:</p> <%= Html.Action("ReadXMLDevices", "ImportXML", new { groupID = Html.Encode(ViewData["GroupsDropDownLst"]) })%> <p>Accessor...

toggling fullscreen mode with javascript with firefox add-on

The firefox add-on I am working on is best viewed in fullscreen mode. (I am not creating a new window, but I insert a transparent div on the body of the current page and display some pictures.) Is there a way to toggle the fullscreen mode or f11 key with javascript? Thanks in advance, ...

How can I dynamically download and run a javascript script from a javascript console?

Is there a one-liner I could execute in a javascript console to download and execute a javascript script from a remote source? I was looking to see if there was a nice way to download this script and use it for experimenting interactively on random pages which may not have say, jQuery loaded. [edit: I'm aware I could dynamically cre...

Simile Timeline filtering content

I am using simile Timeline to display events in event table from my database, where i am loading data using xml, <data> <event eventType="Happy" title="My Birthday" end="2010-08-15" start="2010-08-15" isDuration="false">Party time </event> </data> This would display title,description,start date and end date on simile, but I also want...

spring controller call from javascript. annotations with spring

Is it possible to call a spring controller from javascript included in a jsp? I'm trying to call it like this: form.action='${pageContext.request.contextPath}/spring/myController'; I can see that the control passes throught the lines, but nothing is happening. Also I get messages like get or post is not supported. when I submit the ...

How can i define more than one var in one step?

Hello, is there a good solution how can i define more than one var with the same value in one step an the beginning of my funcion? function myFunction (){ var a,b = 0; document.write(a) // undefined document.write(b) // 0 } Is there a good way to write this like var a,b = 0; ? ...

Cannot set boolean values in LocalStorage?

i noticed that i cannot set boolean values in localStorage? localStorage.setItem("item1", true); alert(localStorage.getItem("item1") + " | " + (localStorage.getItem("item1") == true)); always alerts true | false when i try to test localStorage.getItem("item1") == "true" it alerts true ... so no way i can set an item in localStorage to...