javascript

Is my mental model wrong? A relative css path will be called using https if the page gets called using https.

If your page gets called using https protocol, any relative path to an external css will be called using https protocol as well. Are you really need to encrypt/decrypt css contents? :D However, if you use absolute path referring to an external css, you can specify the protocol to use, generally http rather than https. Maybe I am wrong...

powerful javascript canvas libraries

As a simple javascript library, we have jquery which is very powerful. But I want to know which are some of the powerful canvas library in terms of usability, flexibility and versatility. I found Raphael to be pretty interesting, but I found it has very less effects. ...

JS alert in PHP as part of AJAX app

I've got a PHP file that is being called to fill in a DIV via ajax. Everything works fine and dandy except I can't for the life of me get a JS alert box to pop up from the PHP. Here is what I'm using to test (this is being tacked on toward the end of the PHP, I've also tried it toward the beginning, in the middle, etc): echo "does thi...

function to define current class in js

What I want to do is to have a function that executes to define a "current" class to an <li> tag, depending on the page name. For example, if the page is named index.php, I want the function to determine if the link within the <li> tag is the same name as the page (index.php). I'm sorry I'm not the best at explaining this. Here's an exam...

Javascript detection script

I need a JS detection script that will redirect users who do not have JS enabled to a different page without JS. ...

How do I make an image partially scroll, then stay fixed, then scroll when you pass a section?

I don't even know what I want to do would be called Please take a quick look at this page: http://www.philsalesses.com/plasma-pong/ You'll see the title Plasma Pong and an image under it, on the left side. When I scroll the article, I'd like it to stay put while the page scrolls. However, you'll notice when you get the bottom of the...

Colorbox multiple image slideshow by clicking one image

Please take a look at this site as a reference: http://www.philsalesses.com/plasma-pong/ On the left you'll see a screenshot of an image. If you click the image, it will open colorbox for that one image. I'm using wordpress, so associated with that post there are 4 more screenshots, all in a gallery. What I want to do is when you cli...

Using jquery spin plugin with Facebox

What I am trying to do is create a input box, where users can select a number, utilizing the spin plugin to help along with the process. Outside of a Facebox modal the code works great, inside it does not. Anything appear to be out of the ordinary here? <script type="text/javascript" src="resources/scripts/jquery-1.3.2.min.js"></scrip...

Get content within a tag using Javascript from HTML

I want a javascript code which will go through all the html file in my root folder and sub-folders and gets the content which are within a particular tag, eg: <div id="content"> !!this content!! </div> It should check for a comment at the top of html and only get the content if it exist. <!--Allowed--> It should only get if thi...

this error is getting when i am trying to load light box in my page ?

link text Hi, uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://boxyourtvtrial.com/cakephp-hDemo/js/ajax.js :: anonymous :: line 156" data: no] please help.... thanks ...

Need some help with my jQuery input styler

Here's the, stripped down, code: $(document).ready(function() { var $input = $('input[type="checkbox"]'); $input.wrap('<div class="stylecheck-container" style="display: inline" />').addClass('stylecheck').hide(); $container = $input.parent('div.stylecheck-container'); if ($container.parent('label').length > 0) { $...

Playing sound with JavaScript

Doesn't matter what I do, I simply cant get this to play a sound in firefox or IE, of Chrome for that matter. <html> <head> <script type="text/javascript"> function play() { var embed = document.createElement('object'); embed.setAttribute('src', 'c:\\test.wav'); embed.setAttribute('hidden', true); embed.setAt...

Calling a function defined inside jQuery ready from outside of it.

My aspx page:- <script src="js/jquery-1.4.2.js" type="text/javascript"></script> <script src="js/jquery-ui-1.8.2.custom.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { //lots of other code here.... function showMessage(){ $("#msgDiv").dialog({ ...

jQuery/Javascript: setInterval check if DOM element exists?

hey guys, var check; function showLoader() { $('#mc_signup_form').prepend('<span class="loading"> loading &hellip;</span>'); check_init(); } function check_init() { check = setInterval('check_trigger()', 300); } function check_clear() { clearInterval(check); } function ...

greasemonkey adding onclic event to button

I am attaching onclick event on dynamically created button but the event is not firing. var ind = location.href.indexOf('http://www.abc.com/'); function init(){ alert('h'); } if(ind != -1){ var elem = document.createElement("input"); elem.id ='btnGumb'; elem.value = 'Select Check box'; elem.type = 'button'; ...

How to add a dialog box to the WYMEditor for catching the choice?

I want to add a button to WYMEditor's toolbar that will show a dialog box and paste returned value from the dialog into a content. How can I do it? The real code is welcomed ) ...

javascript array index problem!

hi all , var a = new array(); a[1] = 'A'; b[10] = 'B'; console.log(a); /*[undefined, "A", undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, "B"]*/ I want to remove undefined element but what is the process?? ...

realtime update text in javascript by same id

How do I update the text in the id="b"? <script type="text/javascript"> function updateb() { var a= document.getElementById("a").value; var b = document.getElementById("b").innerHTML = a * 10; } </script> <input type="text" id="a" name="a" value="10" onKeyUp="updateb();" /><p id="b" name="b"></p> <input type="text" id="a" name="a" valu...

Breaking a location.hash into an array using Regex

I'm trying to break a location.hash into an array using a RegEx. I can't for the life of me get the RegEx right. the location.hash can be either "#/A/B/C/D" or "#/A/B/C/D/" and must break down into "A", "B", "C", "D". ...

good jquery/javascript date and time picker for this format?

I can't find a good jquery date and time that displays my selected date and time like this 11-Aug-2010 12:30:38. Any good one you have seen... ...