javascript

wordpress not including javascript on generated page.

Hi, I am having issues with javascript functionality not working in the admin area. When writing a new post things like the ScreenOptions button or the Publish box do not work. I have a local wordpress development install and a deployment install on the live site. Locally is working. I have compared the generated HTML for the post-new....

how do I catch a click outside some container using prototype

document.observe('click', function(e, el) { if (e.target != Element.descendantOf('calendar')) { $('calendar').fade(); } }); I am trying to do something when a click is registered outside a certain container. In my code above, it's the $('calendar'). The above doesn't work. ...

javascript image source

img src tag i want, when click on image the source of the image in javascript variable i want to use the src in javascript ...

How does jQuery accomplish its asynchronous animations?

...or more specifically, how are they able to create animations via javascript, which is synchronous, without holding up the next javascript statement. It's just a curiosity. Are they using a chain of setTimeout()? If so, are they set early, each one with a slightly longer duration than the previous, and running parallel? Or are they be...

Can I see in firebug profiler funcitons list in order those call?

Can I see in firebug profiler funcitons list in order those call? Do you may be know another tools for this? ...

div in bottom of window, not page

I want a div element, in a bottom of window. like a div in bottom page of old facebook.com. or like a chat div of initial facebook.com ...

opensocial: create activity

Hello there, I am currently developing an opensocial gadget and got some troubles with creating an activity notice. After submitting a form I want a new activity to show up for my friends/contacts using this function of mine: function create_activity() { console.log("invoke create activity"); var data = {}; data[opensocial.Activ...

How can I access Java String methods from a String variable passed to JavaScript ?

I'm using the Java Scripting Engine (in Java 1.6) to dynamically evaluate some expressions in my Java program. I can pass my Java objects from Java to JavaScript, and call their methods, but this stops working correctly when I pass String objects. For example, in my Java I can define a class, JavaClass, with a doSomething method. I can ...

Cannot change borderColor of TD

Using JS to set the background color of a TD is fine. But, setting the border color is problematic in FF 3.0.18 although IE 6 doesn't experience this. FF is problematic in that it requires the TD element to have an attribute style initialized to border-style: solid. Without that, setting border color of a TD won't work. Is this known bug...

JS / Ruby : partial replacement using regexp.

Hi, I'm trying to replace different parts of a html code using a single regexp. For exemple i have this text : option_!!NID!! [somme_text][5] some_text_option 5_option_some_text using this regexp: content.replace(/(!!NID!!)|\[(\d)\]|(\d)_option/g, 1)) I expect to get : option_1 [somme_text][1] some_text_option 1_option_some_text ...

javascript image object

<script type="text/javascript"> function GetSrc(elem) { alert ( elem.src ); } </script> <img src="images/yourimage.extn" id="img1" onclick="GetSrc(this);" /> i want to convert elem.src to string, String(elem.src); not working ...

javascript too much recursion?

Hi, I'm trying to make a script that automatically starts uploading after the data has been enter in the database(I need the autoId that the database makes to upload the file). When I run the javascript the scripts runs the php file but it fails calling the other php to upload the file. too much recursion setTimeout(testIfToegevoegd()...

child window s not getting opened in IE version 8

hi im using the below code for disabling the toolbar in child window. i have written the below code in login.js and called the function from jsp during body onload. function () { if (!window.opener) { window.open(/*...*/); } the problem now im facing is tat wen i open in IE version 8 the pop up comes up asking whether t...

Add CSS class with JavaScript

I have the following code that makes check-boxes a little fancier by adding an image sprite to the check-box. Javascript: $(document).ready(function() { /* see if anything is previously checked and reflect that in the view*/ $(".checklist input:checked").parent().addClass("selected"); /* handle the user select...

Accessing javascript function properties before they are defined?

I was reading through this thread: http://stackoverflow.com/questions/61088/hidden-features-of-javascript and found this post: http://stackoverflow.com/questions/61088/hidden-features-of-javascript/61260#61260 I was playing around with the code in firebug and I found that this bit of code seems to work fine: var fn = function(x) { c...

Attach File Through mailto URI

Is it possible to attach a file using "mailto:" redirect in javascript? Something like this: document.location = "mailto:"+recipient+"?subject="+subject+"&body="+msg+"?attach="+"file1.zip"; ...

problem using page.registerstartupscript

Hello, I am using page.registerstartupscript in my code behind C#. Its like this: string item1="category1"; string Script = "window.program = '" + item1 + "';"; Page.RegisterStartupScript("PopupScript", Script); item1 gets generated dynamically from some value in code behind. But its not working. Any suggestoins where I m getting ...

Why are my asp.net pages getting accessed synchronously?

I have a Menu page. If a user selects an Menu Item it opens a new IE Window using JavaScript. So user can open different parts of applications in multiple IE Windows. These Windows have the same Session. My issue is that these pages are accessed synchronously? If one of the child window is waiting for an action to be finished no other r...

Jquery autocomplete on dynamically loaded fields problem

Hello everyone! I have some problem with Jquery Autocomplete plugin (http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/) I got it working, but if I add new input field through AJAX (all fields are the same) - it doesn't autocomplete it. I think the problem is because of "$().ready(function(){...." I think it doesn't acce...

selecting 2nd and 3rd list items in a list with jquery

Hi, I have a list. <ul id="navigation"> <li><a href="#"></a></li> <li><a href="#"></a></li> <li><a href="#"></a></li> <li><a href="#"></a></li> <li><a href="#"></a></li> <li><a href="#"></a></li> </ul> And using jquery id like to apply a clas to the 2nd and 3rd list items. Is there simple code for me to do this? Thanks ...