javascript

Ajax preloader for SWF files.. is it possible ?

Hi all, I am looking for a javascript based preloader that can handle .SWF (flash) files. I'm very much aware that it is possible to preload a flash file by using another flash file, but I was wondering if anyone knows about an AJAX preloader that can load swfs (also, a progressEvent would be a nice extra) and then add the flash file ...

Separate character and number in javascript

Hi, I have one string which contain number and character. I need to separate number and character.I have don't have a delimiter in between.How can i do this. enter code here Var selectedRow = "E0"; I need to "0" in another variable. Help me on this. ...

Dynamically adding two form elements with jQuery

Hi guys, I am trying to create two form elements when the user clicks a button, which he can do 5 times, but I am new to jQuery so I am running into problems, here is the code: $(document).ready(function() { $('#btnAdd').click(function() { var num = $('.clonedInput').length; var numTwo = $('.clonedInputTwo...

javascript inheritence

In javascript what sort of inheritence do you favour? The ECMA standard is to use prototpye chaining. So I just set the prototype of the object that's doing the inheriting (monkey) to invoke a new instance of the object I want to inherit from (animal): monkey.prototype = new animal(); I am aware there are other ways to achieve inherit...

Why use $ in the name of javascript variables?

Possible Duplicates: Why would a javascript variable start with a dollar sign? JQuery : What is the difference between var test and var $test What is the difference between this two ways of initializing variables? var $val = 'something' OR var val = 'something' as I see they are the same thing. Maybe in this case ...

How to resolve error when ajaxtoolkit 3.5 is used "The Controls collection cannot be modified..."

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). I am using it in Gridview's EditTemplate Field to show color with ajax 3.5 This is my master page hierarchy <%@ Master Language="C#" AutoEventWireup...

Html: how to calculate layout boundaries

Is it possible to calculate boundaries for a html layout block? For example there is <div id="area"> ... </div> and it's required to find out minimum size (width, height measured in pixels) to fit the #area into popup modal dialog. How stable are these approiaches? Thank you in advance! ...

Json in Javascript

Hi there, trying to learn json due to work req...i am trying to add and delete records to json object dynamically...can some one tell me why i keep getting UNDEFINED message....here is the code..thanks for the help!! <html> <head> <title>TEST</title> <script language="Javascript" type="text/javascript"> function addC(){ var index =...

Using javascript/Ajax to add, remove, modify wmode in object/embed/param

Hi All I just want that when Ajax is processing, a message saying "please wait" appears on top the flash/swf movie and then dissappears when Ajax is finish. So during the Ajax process, the 'wmode' is set to 'transparent' and when the Ajax finishes, it 'wmode' is back to normal so the mousewheel works again. The "please wait" message is ...

How can I submit two forms on single click?

I have to submit two forms; one is on the page, while the other is coming through combo change event using jquery. I have to get both of these forms values on the same page. Please help me I have already wasted much time. My code looks like this: this function which i'm calling on the button click to submit both forms function forms_s...

Realistic page turn speed

I have written some page turning software simulating a magazine. Currently the speed of the page turning is linear, and I want to make it more realistic with acceleration and deceleration. At the start of the animation it should be slow, half way through it should have reached max speed, then it returns to a slow speed by the end of th...

FACEBOOK JS SDK ::how to post an image on wall

hello i'm trying to post an image to my users's facebook wall once they hit a botton i'm using javascript SDK but i have a problem, the image looks like a link in the wall ... but that's not what i want ... i want to post an image ... same as when you put an image link on your status text field and it turns to image any help ? FB.ui...

Need help on simple calculator

<html> <head> <script language="javascript"> function fadd() { var first,sec,res; first=parsefloat(document.forms[0].txt1st.value); sec=parsefloat(document.forms[0].txt2nd.value); res=first+sec; document.forms[0].txtres.value=res; } </script> </head> <body> <form> Enter 1st number &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input name="txt1st" id=...

javascript disable textbox in jsp page

I have these three fields in my jsp page. <td> <html:text property="my_dto.number1" </html:text> </td> <td> <html:text property="my_dto.number2" </html:text> </td> <td> <input type ="checkbox" id ='isTrue' /> </td> now i want if isTrue is che...

Automatic three-level list numbering with Javascript? IE7 doesn't support CSS counters :(

Hey! The website I'm currently developing has a three-level menu and each item in the menu must have a number before the title: 1. and 1.1. and 1.1.1. for example. Currently I am using CSS to generate the numbers: #menu ol { counter-reset: item; } #menu li a { counter-increment: item; } #menu li a:before { content: coun...

Pass Values Between Two Forms

Hello, Is there any way to pass values between two forms. Let's say, I have two html form. At Form 1, there's one field called name and submit button. At Form 2, there's two field called name and email and submit button. What I want to get is, At form 1, when i fill Form 1 name field and click submit, it will carry me to form 2 and n...

accessing json data

hi there, I am using this array( as an example) http://pastebin.com/M0ZJgAVs i am using json_encode() on it and fetching it using javascript does anyone care to tell me to get the num rows would i simply use var numrows = json['numrows']; and to loop over each row would i use for(row in json['rows']) { } and then inside tha...

Reverse a percentage

I have a percentage, it ranges from 50% to 0%. I need the values to be mirrored, so: 0% now equals 50% 1% = 49% 25% = 25% 48% = 2% 50% = 0% etc. Thanks for any help! ...

Some help with javascript create HTML table other way round

Here is what I have written: var data = [["Jan","Feb","Mar"],["5","10","15"]]; var strTable = '<table>'; for (var i = 0; i < data.length; i++) { strTable += '<tr' + ((i % 2) ? ' class="odd"' : '') + '>'; for (var j = 0; j < data[i].length; j++) { strTable += '<td>' + data[i][j] + '</td>'; } strTable += '</tr>'; }...

Any way i can check if a url points to a valid image (using JS/PHP/ZendFramework)?

i am developing a test/learning app. i wonder how can i test if an image from another site/domain ... i broke up my validation logic to the following exists is an image is of valid type is of a specific dimensions is below a max size - say i want the image to load quickly. tho the hosting resource is not mine. ...