javascript

explore properties and/or functions of javascript objects

Is there any way i can explore the properties and /or functions of a java script object(Like a telerik menu or anyother 3rd party object)? the way i can by debugging and breaking and then adding an object in the watch or by using intellisense in VS. I use vs2008 and i do have the basic intellisense for javascript. I think i will be ...

why wont this style.display work?

Why wont this work? if (byId("annonsera_price").style.display=='inline' || byId("annonsera_price").style.display=='block'){ alert ("Hello"); } function byId(x){ return document.getElementById(x); } update2: <input style="width:100px;" type="text" name="annonsera_price" id="annonsera_price"> I haven't set it with css either...

How do I apply events to dynamicly loaded DOM nodes with JQuery?

I'm using AHAH to load a piece of HTML after the document is ready. There's a button in that chunk of HTML I would like to apply a .click event to. I'm having trouble applying that event after the HTML is loaded. The call back is very generic and is used by other parts of the page so I would prefer not to fill it up with specific code. A...

Why is document.write behaving oddly with an IFrame?

The javascript code below is called by an event in order to overwrite the contents of an iframe with id jj. It works properly. However, removing the calls to open() and close() cause the iframe to become blank every other time the code is called, at least in IE8 and FF3. Opera doesn't seem to care. What is going on here? var a = doc...

How to get the Apple Javascript Split Flap Counter to run on a local machine

I am captivated by the split-flap animation on Apple's 10 billion song download page: http://www.apple.com/itunes/10-billion-song-countdown/ however, I have not been able to replicate it on my own machine. I have downloaded the script and what I believe is the appropriate css, but the page only displays 3 images of the number 0. Has anyo...

How do I target a GridViewRow with an AJAX.Net Toolkit PopupExtender?

Hi all, I have a lot of data to display in a GridView. Because there's so much information per row, I'd like to be able to display additional information when a user clicks on the row, so I thought a PopupExtender from the AJAX Toolkit would be perfect. Ideally, I want the popup to display whenever any of the controls within the row a...

How do i display the time in the user time zone?

On my site the only place i use time is when i insert into the DB. When i pull it i would like to display the time according to the user time zone. I am generating this part of the page in C# (served in ASP.NET but not using .aspx code files). How do i display the time according to the user time zone? I have a feeling i need to have the...

bCrypt implementation in Javascript

I'm wondering if anyone has written or come across any implementations of bcrypt in JavaScript. I'm not against writing the code myself but if someone with a stonger background in cryptography has already written one why reinvent the wheel? Especially considering I'd probably come up with a shoddy wheel. [edit]: Following the links pro...

Javascript Jquery doesn't work. $(this)

$(document).ready(function() { $(".delete_user_button").click(function(){ var username_to_delete = $(this).attr('rel'); $.ajax({ type:"POST", url:"/delete/", data:{'username_to_delete':username_to_delete}, beforeSend:function() { $(this).val("Removing..."...

Javascript: Convert textarea into an array

How would you go about breaking up a textarea value into an array, based on the end of line separation? Use of jQuery is cool by me... ...

Problems with the animation queue deforming my divs

So, I have an animated drop down menu that slides down when your mouse is over it, then fades away when it isn't. Simple enough. But if the use moves the mouse before the animation is complete moving down, then it will either jump to the end of the queue exposing the entire menu and then fading, or it deforms the menu by making it shorte...

How to determine Z-order when drawing in a one-point perspective?

I'm trying to make a simple javascript that draws rectangles on a canvas, then draws the side faces based on a one-point perspective. The problem is, the amount of rectangles and their positioning is arbitrary, so faces tend to overlap in a way that wouldn't happen in true 3D perspective. How can I determine the correct drawing order so ...

How do I overcome IE8 getting "stuck" in SCORM 4th Edition Compliance Test SX-05?

I am posting this in the off chance there is a SCORM expert out there that may have seen something similar. Internet Explorer 8 gets "stuck" on step 14 of test case SX-05. Something doesn't trigger the continue. No amount of debugging and tracing reveals anything. It's as if the test case is "overwhelming" IE8's slow JavaScript engine. ...

My AJAX call is not returning anything but isn't failing either.

I have this html: <input type="text" id="text"/> <input type="button" id="submit" value="Submit" /> <div id="twitter_update_list"> </div> and this javascript: var xmlHttp; document.body.onclick = function(){ var username = document.getElementById('text').value; selectUser(username); } function selectUser(username){ ...

Javascript - Convert string to UTF-16

I am working with Javascript for one of the first times and its for a sha-1 hash. I have found code to do this, but one of its dependencies is a method to convert the string to utf-8, however the server I am comparing against utilizes utf-16. I have looked around and all my results keep showing up w/ utf-8. Can anybody at least point me ...

Chrome Facebook Connect Window Resize

I am experiencing a weird issue in Google Chrome for Mac OS X (10.6). I am using the JS Facebook Connect library and FB.Connect.streamPublish to share a story on a users profile. If the user is already logged in to Facebook prior to coming to the share page on my site, there's no problem - the window opens as an absolutely positioned di...

element.firstChild is returning '<TextNode ...' instead of an Object in FF

I wrote a tab system using some very basic Javascript and it runs like a champ in IE 8 but, in FireFox 3 I am coming up short. The pertitent HTML is as follows: <div id="tabs"> <ul class="tabs"> <li class="current"><a><span>News</span></a></li> <li><a><span>Videos</spa...

How to make div clickable using internal href but not overide other internal hrefs

I have a div with 3 internal hrefs. I need to make the div clickable and have it inherit one of the internal hrefs. Not a problem... however this then causes the JS to overide the other links inside the div, the ones I'm not inheriting for the parent div. Here's my code: <script> $(document).ready(function(){ $("#Products div.product...

Javascript: Put array into a text field

How would you go about putting an array into a textarea, each value on its own line? I thought about converting the array to a string, and the commas into new lines, but what if the value of an array item has a comma? ...

link jquery from google code?

could one link the latest jquery from google code instead of having a local copy? if yes, could someone provide me the link for it so i can link it in from javascript. thanks! ...