javascript

fetch HTML Element object using javascript, mootools

Hi, Please check my HTML below: <table cellpadding="0" cellpadding="0" border="0"> <tr> <td> <div class="toogler">Demo1</div> </td> </tr> <tr> <td> <div class="element">Demo1 Content</div> </td> </tr> <tr> <td> <div class="toogler">Demo1</di...

Browser EventListenerList Implementation

Are there any browsers that implement the DOM3 EventListenerList interface? http://www.w3.org/TR/2001/WD-DOM-Level-3-Events-20010823/events.html#Events-EventListenerList ...

set textstyle asp.net javascript

hello i have <a href ="javascript:NewWindow =window.open('anleitung.aspx', 'NewWindow' , ' top=81, left=499, width=400, height=400'); NewWindow.focus()">Hilfe</a> how can i set the text-style ...

How to change value of character in Javascript?

I have this code here, {foreach from=$cart.cartItems item="item" name="cart"} <div id="cart2Produkt"> <p>{if $item.Product.ID} <a href="{productUrl product=$item.Product}" data-tooltip="sticky1">{$item.Product.name_lang|truncate:20}</a> {else} <span>{$item.Product.name_lang...

expression evaluation with boolean values

In Java or other similar languages I can't do: a < b > c where a,b,c are boolean types. In Javascript I can do that and also with other data types values: var t = 3; var z = true; t > z // will be true Now why the results is true??? ...

How to detect a click or mouse press on IE with Raphael and jQuery

I'm trying to find a way to trigger an event when a mouse clicks on some text generated from Raphael JS. In Firefox, the click event works perfectly, in IE 7 and 8 (I haven't tested earlier versions) neither click nor mousedown work. Click works fine for other raphael objects, e.g. the rectangle in the example. How can I trigger an eve...

Jquery making div fadeout with timer

Looking to make a div fadeout after 10 seconds. Tried various things but can't get the timer working. This is the code: $('#deletesuccess').show(); Edit: This is the full code: function refreshTable() { //timestamp to get around ie caching issue var tsTimeStamp= new Date().getTime(); $('#deletesuccess').show().fadeOu...

jQuery Help - Appear underneath rather than on top

I have the following jQuery which I need adapting: $(document).ready(function(){ $(".rss-popup a").hover(function() { $(this).next("em").stop(true, true).animate({opacity: "show", top: "-60"}, "slow"); }, function() { $(this).next("em").animate({opacity: "hide", top: "-70"}, "fast"); }); }); CSS: .rss-popup { margin: 100px auto; p...

implementing show/hide popup box on mouse click.

I have implented the show part properly. But how to implement the hide of popup on click of anything on the page? And moreover there is a link, on click of which this will expand and collapse also. Any help. Thanks. ...

In browser can I get the image color where my mouse is pointing at?

Hi all: There is a web application for me to build, and rather than image map, I would like to try something more elegant. The story is, there gonna be a global map where different continents are denoted by different colors. Say Australia is red and Asia is green. Will there be a way that when my mouse is hovering on the shape of Au...

Difference in behaviour between javascript click() and user click on a button using JSF

I have a form which, when the button gets clicked by a user, redirects to another page, but when I simulate the click with javascript, the redirect fails. Tha ajax calls are exactly the same (except for the javax.faces.ViewState, but have different results. The form looks something like: <h:form id="form" onkeypress="trapEnter(event);"...

Remove ExtJS Styling

I need to remove styling fron HTML I insert into a fieldset/panel. I recall reading somewhere (in one of the newer releases) that ExtJS provides this features, but I need it for an older release. Has anybody implemented this capability/feature - specifically for ExtJS - or have a suggestion that will work for ExtJS? Thanks. ...

json_encode adding unwanted slashes

Hello all I have a json string saved in my db. When i retrieve it from db to pass it to the javascript function (ajax call) , along with the id of that row, i am json_encoding both (the query result array) and passing it to js. but json_encode is adding unwanted slashes to my already json string. how to escape it. remember i have to pass...

Event binding problem on select option (jquery)

I have a select with an option it with id 'option1'. option1 is the currently selected option on page load. In my $(document).ready, I have: $(document).ready(function() { $("#option1").click(function() { alert("Testing"); }); }); However, the alert is never shown and the event never fires! Is it not possible or s...

Javascript question about forms

I have a form with 2 text inputs and 2 radio buttons, as below: <form id="form1" method="get" onSubmit="exec()" action="default.html"> <label>First input<label> <input type="text" id="input1"/><br /> <label>Second input</label> <input type="text" id="input2"/><br /> <label>Radio button 1</label> <input type="radio" id=...

Alternative to Page_Load in ASP.NET (and a good WTF story)

Woo, I have a doozy of a problem (might even be one for the Daily WTF) and I'm hoping there's a solution. (My apologies for the long post...) I have been working on a website that I inherited about a month ago. One of the parts I have been working on is fixing one of the controls (essentially a dynamic header bar) so that it displays ...

In jQuery, should i use parseFloat(el.width()) or parseInt(el.width(),10)? which one is more preferred

I always had this question: When i dont mind the exact floating number Which one is preferred? parseFloat someValue = parseFloat(el.outerWidth())+parseFloat(ele2.css("marginRight")), parseInt someValue = parseInt(el.outerWidth(), 10)+parseInt(ele2.css("marginRight"), 10), Which method is easier for the JS engine? ...

JSONP request using jquery $.getJSON not working on well formed JSON.

I'm not sure is it possible now from the url I am trying. Please see this url: http://www.heiaheia.com/voimakaksikko/stats.json It always serves the same padding function "voimakaksikkoStats". It is well formed JSON, but I have not been able to load it from remote server. Does it need some work from the server side or can it be loaded w...

comparing a date string to a date object in jquery

I have been passed a date string that looks like this: Thu%20Mar%2011%202010%2015%3A09%3A11%20GMT%2B0000%20(BST) I want to compare this date with today's date and hopefully ascertain whether the string above has happened yet. With my limited knowledge of jquery/javascript I wrote this: var str = new Date("Thu%20Mar%2011%202010%2015%3...

Requesting a JavaScript property in Python (GAE)

Hello again! I'm currently making an iphone web app based on Google App Engine (python). I need to check if the user is browsing not trough safari but by the home screen. I can check this with an read-only 'window.navigator.standalone' Boolean JavaScript property as read on :http://developer.apple.com/safari/library/documentation/AppleA...