javascript

How to create an inclined (not levelled) slideshow?

Hi, is there a way to create an image slideshow that is rotated by say 5° ? I'd prefer a non-flash solution. Thank you! ...

Getting Selected name of a dropdown using Javascript

I have created one dropdown box <select name="select" id="selectId"> <option id="" value="calendar_Second_Calendar_1285942672.xml">Second Calendar</option> <option id="" value="calendar_First_Calendar_1285932160.xml">First Calendar</option> </select> I can get the selected drop down box value using document.getElementById("selectId...

how to write a desktop application which uses HTML and CSS for user interface and python/perl/c++/java for the processing?

different languages have different GUI toolkits but It looks very difficult to achieve attractive user interfaces as good as we can using HTML and css with less effort. I dont my application in javascript as I doubt if it has all the required libraries and i want to do it in python. How do I use rendering engines like gecko,webkit etc ...

How to get height of <div> in px dimension

Hi, I have used jquery library to find out height of div. Below is my div element with attributes : <DIV id="myDiv" style="height:auto; width:78;overflow:hidden"> Simple Test</DIV> Below is my jquery code to get height of <div> var result = $("#myDiv").css('height'); alert(result); After executing above statement I am getting res...

JS: querySelectorAll with respect to z-index

I would like to select all "div" elements that are children of the "body" and have z-index: 2 property set. document.querySelectorAll('body > div'); How do I involve the z-index check on this querySelector? ...

javascript testing if value is in array

Is there a function in javascript to do this - test if a given value (a string in my case) exists in an array (of strings)? I know I could just loop over each value, but I'm wondering if js has a shorthand for this. ...

How to retrieve the selected value from Drop-downList using Onchange event in Perl?

Hello everyone,I have a Select tag in the form in which i am giving the Static Options, My problem is to know "how to retrieve the value which i have selected",I dont want to use any Button to submit the value which i have selected.So i want to go with the "Onchange event " of select tag. here's the code by which am populating the selec...

Open a local file from local html+js page

Is it possible to show a dialog box to let the user select a file on the local drive and then read its content from a local html page using js? Is it possible to save a file to a user chosen path? I'm planning to write a simple script to open file and encode its content inside images (not steganography, just the file's raw bytes). Tha...

calling applet functions from JavaScript

This is probably really basic and Simple but my Gogle-foo is failing me. I have an applet embedded on the page via an Object tag. It has method public void foo(String bar) Now I want to call foo with baz, So I do getElemntById('myApplet').foo('baz') Which doesn't work, and I cant get info from Google-foo on what is the way to ...

Use field name variable in JQuery validation rules

I am a jquery newbie. I could get the validation rules working in my form. I am using a Java framework and for some reason, when it converts from .xhtml to .html, all the ui component's id/name were prefixed with the form that containing it. I would like to reuse these validation rules for two other forms but because of the prefix issue,...

Obsession with non-blocking scripts

Since i discovered the concept of non-blocking scripts i have become obsessed with loading all my external scripts this way. I have even hacked Joomla! templates(which i know is a bad practice) in order to load non-blocking scripts in the index.php file. Example code below. (function() { var script = document.createElement('script'...

How to check which radio button has been selected in javascript?

If (acctRB.Checked == true) { Execute Business Code } ...

Strip out 0 and any non number characters Javascript

How could I change this code to not allow a 0 and to strip out all non number characters? <script type="text/javascript"> (function() { var a= document.getElementsByName('a')[0]; var b= document.getElementsByName('b')[0]; var c= document.getElementsByName('c')[0]; a.onchange=b.onchange=a.onkeyup=b.on...

How do I disable scripts in my iframe?

I have an iframe that loads a page that I would like to disable the javascripts loading in the iframe loaded page. The loaded page has menu bars, dropdowns, etc. that make the home page that I am loading this iframe from load slow. Is there a way to disable javascript from my iframe page? I need the javascripts to remain in the page...

add user page to a hosted website

I have a website that my company hosted using hubspot.. now the guy who made it is gone.. Currently all the code is in the front end which i think was made by using the CMS tool of hubspot. What i need to do is add another page to this website which has my code and also has a backend code in it. Plese help me how do i proceed.. i am c...

LocalStorage Firefox 3.6

According to everything I've read, Firefox 3.5+ supports localStorage. And yet I'm seeing the alert (failing) in Firefox 3.6. Do I have some strange settings in my Firefox? Any ideas? function supports_html5_storage() { try { return 'localStorage' in window && window['localStorage'] !== null; } catch (e) { alert(...

JavaScript equivalent of the MySQL function SUBSTRING_INDEX()

Hi, SUBSTRING_INDEX() in MySQL returns a substring from a string before the specified number of occurrences of the delimiter. Is there any equivalent function in JavaScript? I need to perform the same thing.. but on a string value in JavaScript. ...

Scriptable JavaScript interpreter with bindings for PHP or Python?

Does anyone know of a JavaScript interpreter that has bindings to PHP or Python? ...

JS: "The callee (server [not server application]) is not available and disappeared." accessing window.opener

In our (quite large and old) ASP.NET application we use a lot of pages loaded into frames, iframes, and modal dialogs (using window.showModalDialog). We are starting to see the error above quite a bit, and I can't seem to find a single rational explanation for it anywhere. Popup Blockers. Nope. We're not running them. Not even the buil...

remembering page state (checkboxes, show/hide panels) using cookies and jquery

I have a page that has panels that can be set to visible or hidden. There are also some checkboxes that need to be either checked or not. I want this state to be stored in a cookie, what's the best way to do this? ...