javascript

A column of a table needs to stay in one line (HTML/CSS/Javascript)

Hi Folks ! So I am having an issue on my entrepreneur business opportunity rating matrix : I would like the radio buttons to stay on the same line. The problem is that I don't know how I should process because if I give a fixed minimum width for the cell, i'm not sure it will display properly on other browsers, and if the cell is to big...

JS: Object itteration fails

Hello! In my JS, I have an object called box_object. It looks like this: ({ id:"3", text:"this is a box object", connection_parent:["1", "2"], connection_child:["5", "6"], connectiondata_child:{ 0:{id:"5", linepoint:"bottom"}, 1:{id:"6", linepoint:"bottom"}}, connectiondata_parent:{ 0:{id:"1"...

How to dynamically assigning style properties to element?

function styling(elem, props) { for (var i in props) { if (i == "color") { elem.style.color = props[i].toString(); } if (i == "background") { elem.style.background = props[i].toString(); } } Using it: sty...

Hide and Show content based on Cookie value

Here is my Jquery: $("#tool").click(function() { $(".chelp").slideToggle(); $("wrapper").animate({ opacity: 1.0 },200).slideToggle(200, function() { $("#tool img").toggle(); }); }); When you click #tool img #wrapper is hidden along with .chelp. I need to control this with a cookie, so when the user hides #wrapper...

window .open is not opening on page load in ie8

Hi unable to open window.open on page load in ie8 If I use window.location its not opening in new page please help me out of this. ...

How to add clickable logo on the flash web player?

Hi All, I have a code like this <script type="text/javascript" src="http://www.clipul.com/play/swfobject.js"&gt;&lt;/script&gt; <div id="player">This text will be replaced</div> <script type="text/javascript"> var so = new SWFObject('http://montsmile.com/jwplayer/player.swf','mpl','480','380','8'); so.addParam('allowscriptaccess','a...

Javascript - cannot make static reference to non-static function ....

I am making a reference to the Javascript function splice() on an array and I get the error: "Cannot make a static reference to the non-static function splice()" What's going on - how is this a static reference, aren't I referencing an instance of an Array class and its method - how is that static? $(document).ready( function() { v...

find and replace tokens in javascript

Hello, I have to do something like this string = " this is a good example to show" search = array {this,good,show} find and replace them with a token like string = " {1} is a {2} example to {3}" (order is intact) the string will undergo some processing and then string = " {1} is a {2} numbers to {3}" (order is intact) to...

jscrollpane block scrolling parent

Can i make jscrollpne such that parent pane doesnot scroll even when child scroll has reached its bottom. Now when child scrolling reaches bottom scrolling of parent occurs. I want parent to scroll only when mouse is out of child scrollpane. ...

Integration JS and Java

Hello, I have two systems to integrate: 1)desktop application (Java6) and 2)web-application (HTML,JS). I want first application to share some services to the second one. How could simply I do that ? I want some simple solution. Thanks! ...

jquery to find all the elements inside a div tag.

Hi, How to find all the anchor tags inside a div tag and need to append one more property to the anchor tag. say target="_blank". How can i do this in using jquery? ...

Confusion in JavaScript RegExp ? Quantifier

Hi, May I know the reason of getting the output of the following code as: 1,10,10? Why not it is as: 10, 10? <script type="text/javascript"> var str="1, 100 or 1000?"; var patt1=/10?/g; document.write(str.match(patt1)); </script> ...

When actually is a closure created?

Is it true that a closure is created in the following cases for foo, but not for bar? Case 1: <script type="text/javascript"> function foo() { } </script> foo is a closure with a scope chain with only the global scope. Case 2: <script type="text/javascript"> var i = 1; function foo() { return i; } </script> same a...

java script image changing and fading

hi have problem in image fading.and image changing..like slide show...i have tried image slide show it as come out well but when i tired to some effect...i.e before the image changes ..it has fade and then next image has to come in fade effect....then brighter so on....wht to any simple example or any small.or any url to go through ...it...

Best Book on HTML, CSS, Javascript, ASP.NET & Ajax

Hi Which is best book to learn HTML, CSS, Javascript, ASP.NET 3.5 & Ajax? I would like to have a single book covering all the above topics. Thanks Satyaprakash ...

Why navigator.appCodeName returning Mozilla?

I am using the browser Firefox and IE. I have run the java script program. In that I was found both the browser code name is showed as: Mozilla. Why? The code is <script type="text/javascript"> document.write("Browser CodeName: " + navigator.appCodeName); </script> ...

Toggle image based on cookie value

Im using a couple of JS functions to set a cookie named 'visible' with the value of either yes or no. Essentially Im using these values to decide if a <div> is visible or hidden. I've only just added the cookie, previously I had been using two images 1. Show 2. Hide as a button to hide and show the <div> like this: HTML: <img class=...

FF extension: a popup with dynamic menuitems, with each menu item having another popup

I am building an extension that has a popup whose elements are constructed by a function call everytime the mouse hovers over the popup option. I am able to achieve this. Now I need to have a popup for each of the menu item (inside the original popup) which is not dynamic though. I have this code, but it does not work: var myMenuPopup =...

jQuery - Save to SQL via PHP

This is probably easy for you guys, but I can't understand it. I want to save the filename of an image to it's own row in the SQL base. Basically, I log on to the site where I have my own userID. And each user has its own column for background images. And the user can choose his own image if he wants to. So basically, when the user cli...

@ symbol for strings in jQuery

if (confirm('<%=Ns1.Ns2.MyClass.GetResourceText("DeleteConfirmationMessage")%>')) { /* something to do...*/ } I have a jQuery expression as above. But the return value of GetResourceText method is a very long string. So my page renders the function like below: if (confirm(' Are you sure lablabla? If you delete this lab...