javascript

Png in IE browsers problem

I have a png image inside a DIV which fades in and out with js code. This works in all major browser except IE browsers. I have tested IE6, 7 and 8, and all look the same. I have even tested with a pngfix javascript code but this didn't help at all. What happens is that the png image shows up, but has rough black edges which are very ...

Javascript - Call a function when i send a from trought an href

Hi. I have this : <form onSubmit="return loadingArtP();" action="./index.php?status=addarticle" enctype="multipart/form-data" method="post" name="addarticle"> // some input parameters <a href="javascript:document.addarticle.submit()">Add</a> </form> When i click on "Add" i need to call the loadingArtP() function before send th...

calling a function in setTimeout

var my_new_function = function(){ ---- }; window.setTimeout(my_new_function, 1600); the above works properly without any errors. when i use: window.setTimeout("my_new_function()", 1600); it's working properly, but firebug is showing error : my_new_function is not defined in some articles about setTimeout, i found calling fun...

pass e parameter, jQuery

Hi, I have the following code in my document ready: $('a').click(function(e) { e.preventDefault(); var $this = $(this); var horizontalPadding = 30; var verticalPadding = 30; $('<iframe id="externalSite" class="externalSite" src="' + this.href + '" />').dialog({ title: ($this.attr(...

Validate Extension (jQuery)

<input type="file" id="css-file" /> <input type="text" id="css-url" value="eg. http://domain.com/style.css" /> I need both the fields to accept only .css files. Can I validate without having to use a validation plugin just for these 2 fields? If anything other than .css is detected, it should give an alert() Thanks! ...

Java to JavaScript communication

I want to access HTML elements from within my Java applet. Like I want to do following: Pass a value of text box to applet From applet I want to set some text inside an HTML page. Like applet takes some input from text box. Does processing and then print output as href on HTML page. How can i do this? I heard of some java library: ...

delete html, jQuery

Hi, have a look at this example link text It creates a dialog with a iframe init that loads an external page. The dialog is added to the DOM. Is it possible to delete it on dialog close event? ...

SWF does not load.

ZeroClipboard.setMoviePath( "/zeroclipboard/ZeroClipboard.swf" ); var clip = new ZeroClipboard.Client(); clip.setText( $('textarea#download_me').text() ); clip.glue( 'clip' ); I'm using the popular ZeroClipboard plugin to copy content to user's clipboard. It works perfectly in the dev enviornment as well as on domain1.com but not on do...

Fading PNG in Internet Explorer not working

I have a div which contains a PNG image, like this: <div id="pop" class="pop_komm"> <img src="Graphics/komm.png"> </div> I have a js code which is triggered on the "OnChange" event of a drop-list: <select onchange="fadeIn('pop');" name="list" etc></select> Here is the js code: function setOpacity(eID, opacityLevel) { var eStyl...

CKEDITOR: how to install on simple form?

Hey, I am creating a simple form (title - content - submit), and I want to mix CKEDITOR in the content area. How do i do it? the form looks like this: <form> <input type="text" /> <textarea></textarea> - **here I want the CKEDITOR** <input type="submit" /> </form> very simple.. thank you! ...

Javascript form function submit not auto submitting

Javascript function ASP <body onload="form1.submit();"> is not submitting the form below once the page have loaded. <script type="text/javascript"> $(function() { var count = 20; $.extend($.wordStats.stopWords, {'retrieved': true, '2007': true}); $.wordStats.computeTopWords(count); var ...

How can I disable the submit button until text is entered in the input field?

I have an issue try to achieve this result, pretty much what I need is to disable the submit button until text is entered in the input field. I've trying some functions but without results. Please if you can help me with this it would be really appreciated. HTML Markup <form action="" method="get" id="recipename"> <input type="text" id...

Load remote JavaScript files via the address bar

Is it possible to load remote JavaScript files from the address bar? I have been trying to put this into the address bar: javascript:src='http://depot.com/file.js';funcname(); I'm not using this for bad things. I'm just testing my site, that's all. If you wanted to protect your site you must learn to attack it first, right? ...

Javascript adverts stopping my javascript buttons from functioning correctly

I have two javascript adverts on my website (that have a tracking mechanism so I get a bonus if the user clicks the advert and signs up at the site being advertised). Both of these poker adverts are interferring with my other javascript functions. For example, I have an ajax post form and when I fill it in to make a comment and click su...

HTML5 localStorage apped new data to already existing keys

I have the following localStorage keys: localStorage.setItem(1, "some data"); localStorage.setItem(2, "some data"); localStorage.setItem(3, "some data"); . . . localStorage.setItem(600, "some data"); How can I append to those Keys new data in a loop? var i = 0 for(h=0;h<600;h++) { key = i++; localStorage.setItem(key, "new data"); } ...

RegEx to match pair of Rectangular Brackets using javascript

Hi, Can someone help me with a Javascript regular expression? I need to match pairs of brackets. For example, it should match "[abc123]", "[123abc]" in the following string: "this is a test [abc123]], another test [[123abc]. This is an left alone closing" Thanks in advance. ...

Crockford's hanoi function (from "The Good Parts")

Hi, at the moment I'm reading Douglas Crockford's book, and the towers of hanoi function is a bit over my head. Even with logging stuff to the console I wasn't able to really understand what's going on. Here's the function with my additions: var hanoi = function (disc, src, aux, dst) { console.log(disc); console.log(src, dst); ...

Autocomplete textbox with images and multiple selection using delimetre ','

hi i want a jquery or simple javascript script than gives us a control of autocomplete textbox with images with multiple selection option using delemetre for example i have to add two users of website into a group .. so i want that when i enter a first letter of a name user picture and name will be further i want that i could add multi...

Use jQuery to scroll to the bottom of a div with lots of text

I have a div with a scrollbar on the right when there is a lot of text in it. I tried to use this code to scroll to the bottom of a div when the page loads, but I am not having much luck. How can it be achieved? Style: div.messageScrollArea{width:100%; max-height:300px; overflow:auto;} JavaScript code: $(document).ready(function () ...

Find name of selected option using jQuery

I've made a jquery/ajax function that updates #courses, sending #fos's .val() and .text(), specifically of the one that is selected, like so: $('#selling #fos').change(function() { $.post('/ajax/courses', { fos_id: $('#selling #fos').val(), name: $('#selling #fos :selected').text() }, func...