javascript

mochi games integration problem

We send below code of request according to the instruction of mochi games client: var options = {partnerID: "xxxxxxxx", id: "idx"}; options.userID = 1; options.username = 'username'; options.gateway = 'http://example.com/game'; options.width = 320; options.height = 300; options.debug = true; Mochi.addLeaderboardIntegration(options); T...

jQuery .load and links are not clickable anymore?

Hi. I'm updating some data from sidebar when I click one element on mainside. When it's updating data from external file (calling same query what is in original sidebar) those links are not clickable any. Here is clip from my custom.js $(function() { $(".removeItem").click(function() { var commentContainer = $(this).parent(); ...

What JavaScript table widgets are available?

Shortly, I'm going to need a JavaScript table widget for a new project - what options do I have? Thanks in advance. ...

QuirksMode & JavaScript Implementation

I would like to ask if Internet Explorer in QuirksMode has a different JavaScript implementation than IE in a normal mode (when doctype is correctly defined). Is it possible that a JavaScript code will behave in a different way in QuirksMode and in normal IE mode? ...

Validate IP address is not 0.0.0.0 or multicast address

Using JavaScript how would I validate an IP address "x.x.x.x" is a valid IPV4 unicast address e.g. is not 0.0.0.0 or multicast (224.0.0.0 to 224.0.0.255, 224.0.1.0 to 238.255.255.255, 239.0.0.0 to 239.255.255.255)? ...

Microsoft Ajax script extensions - same in both ASP.NET AJAX and ASP.NET MVC?

Are the client side javascript extensions, e.g. MicrosoftAjax.js, the same in both ASP.NET AJAX (for ASP.NET WebForms) and ASP.NET MVC? For example, does it still include: Global Namespace Sys Namespace Sys.Net Namespace Sys.Serialization Namespace Sys.Services Namespace Sys.UI Namespace Sys.WebForms Namespace although I'd suspect t...

Can't get WSDL from Webservice with Javascript

Hello, I am creating a website which calls a WebMethod in an .NET Webservice. To archieve this I use the JavaScript SOAPClient described here (with source code). The method SOAPClient._loadWsdl(url, method, parameters, async, callback) tries to get the WSDL file from the webservice. But the wsdl var stays null. I used a network ...

How to suspend execution of javascript?

Hi! Is there any way to suspend execution of javascript until whole page is loaded in a browser? I am updating a div at the bottom of the document using AJAX but when I click this link before whole page is loaded I get an error... <%= link_to_remote 'Update', :update => 'div_at_the_bottom', :url => { :usual_stuff } %> ...

finding and replacing parameters in href with javascript

Here's the issue: I need to check for a parameter in the query. If it's been set, then I need to change it (harder part). If it hasn't been set, I need to set it (easy part) I was so sure it would be an easy task, but it somehow ended up being a bit more complicated than I thought. Especially for those cases where there are multiple pa...

Use JS to change bracketed text with link to specified page

I would like a way to replace the bracket text everywhere on a page with a link. I know this could be done serverside with php/etc, but I would be able to include this script to be able to simply be included and to handle the replacement itself. For example: If [page=12] is found within the page I would like to link it to: to change i...

How to access webpage data from a firefox extension?

I have managed to get a custom very basic extension running in Firefox. What I want to do next is: Check if the user is on a desired webpage If yes: check the page on each postback for a hidden element containing a string If found: launch an external app with string parameter I have some experience with javascript on webpages, but ...

Sharing templates with Rails and Javascript

So I have a have a solution for this, but I wanted to get some opinions and see if there was a better way to do this. My problem is basically that I list of data that will get generated on load by RoR and then have JS controls to view subsets. I would rather not have to support two versions of what is basically the same HMTL. So my sol...

About javascript and DOM, is this standdards-compliant?

<form name='form1'> <select name='sel1'></select> </form> <script> document.form1.sel1 ... //access element by it's name attribute, is this standard? </script> ...

Refering to arrays of form elements (name="blah[]")

I have a form with series of 3 file upload fields, each of which has a related hidden "todo" fields. The file upload fields start greyed out and a user can either upload a new file, remove a file if one has previously been uploaded in that position or leave it unchanged (i.e. use the previously uploaded file or leave it blank). The tod...

ASP.NET Ajax Render Html from Client or Server?

I am using an html <select> (not the server control) on my asp.net webform, which I bound using asp.net ajax via a webservice call. In my webservice I basically do this: Private Function GetStores() As String dim stores as DataTable = GetStores() dim html as new StringBuilder for each row as DataRow in stores.Rows html.append(...

How to give sentence case to sentences through CSS or javascript?

How to give sentence case to sentences through CSS or javascript? I've tried these CSS properties but these are different capitalize Transforms the first character of each word to uppercase uppercase Transforms all characters to uppercase lowercase Transforms all characters to lowercase Edit: 19 FEB 2010 is there any option i...

Loop through a repeater client side

Hello All, how to loop through a repeater client side when page has a masterpage? Thanks ...

jQuery: Make div clickable to check nested checkbox

<script language="javascript" type="text/javascript"> $(document).ready(function() { $('#myDiv').click(function() { var checkBox = $(this).children("input[type='checkbox']"); checkBox.attr('checked', !checkBox.attr('checked')) }); }); </script> <div id="myDiv" style="background-color:red;h...

Anyone can suggest a jquery lightbox plugin that allow embedded html and is easy to custom CSS?

there are the criteria can style the modal box(round corner, window and background color etc ) allow embedded html and custom its position can custom style for the 'forward' and 'back' buttons, their images and positions have a 'play' button for image slideshow or allow custom JavaScript to do so thanks ...

rounding in base 10

I have a function to round a number given to the function to the nearest whole pence. <script type='text/javascript'> Math.roundNumber = function(a,b){ if(!isNaN(parseInt(a))){ c = Math.pow(10,b); return (Math.round(a*c)/c); } return false; } </script> however it has come to my attention that the said number inputte...