javascript

Dashcode: changing parameter of datasource does not work in Chrome

Hello, If I run the following code in runtime: var scheduleFromTo = dashcode.getDataSource("scheduleFromTo"); scheduleFromTo.setValueForKeyPath(102, "parameters.fromStationNumber"); scheduleFromTo.setValueForKeyPath(103, "parameters.toStationNumber"); it works as expected in Safari, Firefox, Opera and even IE7, but not in Google Chro...

Is it possible/feasible to build a large-scale Flex application for free?

I want to create a fairly large-scale Flex web application that has a similar interface style to Grooveshark. When it comes to web development, I have always used the common PHP/HTML/JavaScript technologies. Now, I want to try something new and develop a RIA using Flex. Using PHP/HTML/JavaScript, I am able to develop my entire website...

jScrollPane Scrollbar height relative to div

Hello, I have a resizable div which is using custom scrollbars of jScrollPane. I want to have vertical scrollbar above the resize handle, is it possible to do so? I tried changing verticalTrackHeight to be always 40 less and bar size reduces too, but when we scroll the scroller goes to the bottom. Here is my code http://www.jsfiddle....

Question about the javascript-canvas object (save, transform, restore)

I've been playing around with canvas a lot lately. Now I am trying to build a little UI-library, here is a demo to a simple list (Note: Use your arrow keys, Chrome/Firefox only) As you can tell, the performance is kinda bad - this is because I delete and redraw every item on every frame: this.drawItems = function(){ this.clear(); ...

how to show repeating divs on mouse over with jquery?

hello. for example ive got a div like: <div class="y1"> <img src="i/o.png" /> </div> and <!-- pre load --> <div class="p1" style="display:none"> <h5 class="ob">Title</h5> <img class="ob" src="i/ob.png" /> <small class="ob">Description</small> <a href="#" class="oyna">PLAY</a> </div> and this jquery <script type="text/javascript"> ...

Copy (e.g. with load or find) with jQuery an HTML Markup with included Inline Script - How to realize?

Hey Stack'er I want to crop a part of an HTML markup with Inline-JavaScript included. Example: <div id="foo"> <div id="bar"> <script> ..some function.. </script> <p>...</p> </div> </div> With the jQuery functions find() and load() you are not able to copy the whole markup WITH the JS-Snippet includet...

Waiting message for Store

I have grid and relating store. How to add waiting message to grid while store update the some record ? ...

javascript input via native popup

In the past, I've seen javascript alert() style popups but they had input fields in them. These forms are much like the primitive username/password field inputs you see when an .htpasswd file is used. Can someone tell me how to implement this using regular javascript? (No libraries please) ...

Using element object with jQuery method?

Hi, I just started using jQuery. Now I want to use an jQuery method with an element object. var element = document.elementFromPoint(x, y); element.offset(); Of course this doesn't work because the variable element is not a jQuery selector, so the error message I get in Firebug is "element.offset is not a function". Is there any gener...

Any idea why the X,Y position of this element is 0,0?

I have the following javascript function in my extension: function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return...

Display modal form before user leaves page

I've used window.onbeforeunload to display a custom message when a user attempts to leave a site. Example: window.onbeforeunload = function(){ if(some_condition){ return "Are you sure you want to navigate away from this page?\nAll unsaved changes will be lost."; } }; +--------------------------------------------------------+ ...

In a loop, do any operations in the end-condition get evaluated in every iteration?

In the following code: for (var i = 0; i < object.length; i++){ .... } does the operation object.length get evaluated every time in the iteration? It would make most sense that the language will evaluate this once and save the result. However, I was reading some code where someone evaluated the operation before the loop star...

How do I make a multiple select have an X at the end of each option to erase it?

I wanna make a select multiple list have an X to the right of each option and when I click it it should remove it from the list. I think this would be a mixture of jQuery to delete itself and CSS to add the X at the end of the option. I'm already using this javascript function: function addToList(list,firstOpt, secOpt,number){ ...

Why doesn't my event fire the first time?

$(document).ready(function () { $('.raj').click(function () { if (!$(this).hasClass('already')) { $('.infos').html(''); $('.infos').hide("fast"); $.ajax({ type: "POST", dataType: "json", url: "ggg/hhh/rrr.php", success: func...

Display popup with text and graphics on mouse over

Hi, I want to have a popup window such that when the user hovers mouse over the image, it displays that popup window on the right of the image. The window would contain text as well as graphics. The window should close the moment my mouse is out of the image. I tried various scripts that are on the internet, but they show the text as i...

ExtJS: starting HtmlEditor defaulting to source

Hi, I'm using ExtJS 3.2.1 and I need a component almost identical to the bundled HtmlEditor, with one exception: it must start editing the HTML source code directly. The reason I don't use a normal TextArea is that the user should be able to preview the result of his actions before submitting. I've tried calling toggleSourceEdit(), as p...

[JS] Element ID

Hello Stackoverflow! I'm trying my best to make my jQuery / AJAX scripts, but sometimes I run into some problems, like right now, so I'm seeking some help! On a game page of my website, in the comment box, you find a little "Like (0)" link right there, and when you click, well it actually adds +1 to the comment, without any page reload...

How to apply multiple filters on XML data using jQuery?

I need to apply different filters on XML based on different links that are clicked. I'm having trouble filtering results that need to have more than one filter. One is to check if an attribute exists then I also need another filter that will get the nodes that have that attribute as well as another that contains a specific category. He...

Javascript work before submitting aspnet mvc form

Hi I guess this is a pretty easy one :). I have an aspnet mvc view with a Beginform, that specifies an action and controller to hit on submit. But on submit I want to call a service using jquery to get some data and then submit those data with the form. Currently I have a submit button on the form where the onclick event of the button ...

jQuery: hover div set link to visible

Hi, I have a that contains a link with class 'remove-project' that I want to default to hidden and set to visible when the div is hovered. So far I have this (which doesn't work) $('.project-container').hover(function() { $(.remove-project).show(); }, function() { $(.remove-project).hide(); }); <?php foreach($user['Proje...