javascript

JS question HELP

How to make a negative number to be gative (ie. -25 to be 25) in JS? ...

remove selected style on a DIV

I am doing iPhone development and I set a webview with a DIV. I added 'toucstart' 'touchend' 'touchmove' events to this DIV. But after I added these events, the DIV has a style (look at this video : http://www.bluefly.cn/mask1.swf ) when 'touchstart' (like 'mousedown'), any one knows how to remove this visual effect? ...

Ideas for creating a Calendar control

Hi, I am trying to develop a calendar control as shown in the following link. http://img143.imageshack.us/i/calg.png/ If you look into the date Nov 12th, you can see some records. The number of record will vary. So ideally the height of a row will shrink/expand based on the number of records. Please guide me how to achieve this. My ...

table is breaking -jQuery

Hi All, I have a table, now on load i am hiding few last rows.Now on click of a span it will expand (last few rows)and collapse.I am using Slidetoggle(), and its working fine in IE, but the problem is its breaking in FF, first few rows are breaking in FF.how to fix this?any suggestion? EDIT: $("tr").slice(index).slideToggle('slow')//thi...

Not able to run upload.php using YUI Uploader

I'm trying to get YUI uploader work on my computer / localhost, by using this example . The javascript the page use, can be view here. The upload button has the following handler: YUE.on('upload', 'click', this.upload, null, this); (...) upload : function(e) { YUD.get('browse').style.display = 'none'; this.uploader.disable(...

How to get size of an image in javascript?

In PHP there is filesize(),what about in javascript? ...

Javascript-How to get the second larger integer by "array"?

"Find the two largest values among the 10 digits entered. p.s. Use 'prompt' to get the integer from user." I would like to solve this question by "array", not "if", what should I do? I have tried, but error..... <script type="text/javascript"> var a, b, c; var arr = new Array[3]; arr[0] = a; arr[1] = b; arr[2] = c; a = window.prompt("...

Is it possible to get autocomplete for a rails application in text editors, not only text fields

I have searched a lot, but did not find anything useful, so I just ask. The context is Rails 2.3.x, the usual javascript libraries. I would like to reach the following: I would like to have something similar to <%= text_field_with_auto_complete :recipe, :name %> but on text editors: <%= text_editor_with_auto_complete :recipe, :descript...

Facebook connect displaying invite friends dialog and closing on completion

I'm trying to create a Facebook Connect application that displays a friend invite dialog within the page using Facebook's Javascript API (through a FBMLPopupDialog). The trouble is to display a friend invite dialog you use a multi-friend form which requires an action="url" attribute that represents the URL to redirect your page to when...

image attachement in input fields

hi i am having one form in that input fields are regno,name,date of birth etc with this input fields i need to attach image along with this input fields how i can do using php/javascript can anyone help me out thanks in advance ...

autoreload partial every few seconds ala twitter search style

How can i autoreload every few seconds a partial, just like in twitter seach. i am using rails and hobo. ...

How to disable javascript debugging on Visual Studio 2008?

Hello mates, I'm getting crazy with the VS2008 javascript debugging. Every time I run my web application (mvc) it starts to debug everything. I don't want it! I didn't find any option for that and I already disabled js debugging on IE. Thanks ...

How to pass data from javascript to python?

Hi Friends, I have a javascript file, on click of a submit button i need to pass user information to my python exe? From the python exe i need to load and a call a function in my vc++ dll? Please provide me your valuable inputs? ...

Form submit problem using JavaScript in Internet Explorer 6

I have just done the code for submit the form using JavaScript. It works in all browsers except in Internet Explorer 6. I have pasted my HTML form and JavaScript code below. Can you please find what's the problem with it? JavaScript: <script type="text/javascript" language="javascript"> function dodelete(image_id) { ...

How do you make a draggable <tr> using YUI3?

Hi! I'm using YUI3 and I've been trying to make <tr> tags inside a table draggable with no luck. I've found that I can drag <div> nodes around, but for some reason I can't drag a <tr>. It shouldn't be a limitation, I've found examples of YUI2 where this is done, but the code is completely different from YUI3 and I can't figure this out....

Issue with scope and closures in JavaScript

My question is really more about scope in JavaScript, rather then closures. Let's take the following code: var f = function () { var n = 0; return function () { return n++; }; }(); console.log(f()); console.log(f()); The above code outputs: 0 1 As you can see from the above code, f (self-invoked) returns a function, creating...

How to access Silverlight client and server side?

Hi, I have a real basic Silverlight app consisting solely of a label within an ASP.NET web page. It is included as an object. If I want to change the Silverlight's label content via a button placed on the ASP.NET page. Could anyone provide a sample on how to do this both via javascript and server side via c#? Thanks. ...

sIFR3 h1 height

Hi there, I use sifr3 for my text. Now my problem is that i can't get the line height right for my tag. Can somebody please help me? line-height, height, leading etc wont work. Here you can find the output: http://www.bbp.nl/luuk-test/emmc/ ccs code: .sIFR-active h1 { visibility: hidden; font-family: Verdana; font-size: 14pt;...

Does this JS code wait for AJAX request to complete?

Hello all, I want to write the following JS code but I am not sure if it will work - its going to be a lot more complicated than the below and I was hoping to get advice from others before I waste a lot of time. function ajax_request(array_element){ $.get("process_txt.php", { path: full_path }, function (data){ })...

measure page rendering time on IE 6 or FF 3.x

I have a page constructed using Dojo and I need to measure how long the page takes to complete rendering on my browser (NOT time-to-first-byte, or time-to-last-byte). In other words, the page (all bytes) might get downloaded to my broswer but the components I'm using (eg. calendar, grid etc) might still initialize and render long after ...