javascript

Jquery, What does slice return on failure?

I can't find this anywhere, how do you check to see if slice is returning elements still in the list? Like $('.class').slice(n-th,n-th); When n-th variables are increased throughout the index of the return class by slicing, how do you know when slice returns on an invalid index? Hope I explained that well. Here is the example code of w...

javascript firebug error help

Hello, For the life of me, I can't seem to find the issue with my javascript. Firebug is spitting out the following error: missing ) after argument list [Break on this error] $.getJSON('http://local.yahooapis.co... results +'&output=json&callback=?',\n Here is my code: function getLocationJSON(fooBar) { var appid = 'RvkxtGN.OtlDns...

Deactivate INFO messages for YUI3 on node.js?

I'm using YUI3 on node.js but I get all these INFO messages. How do I deactivate them? ...

How to encrypt my HTML, PHP & JavaScript?

Guys/Gals I have made a website but now I want to encode the script so that no one can copy. I'm using PHP, JavaScript and HTML in each page of my website. So how do I encrypt each and every page? Thank You. ...

javascript mailto attachment not showing up

hi guys, i'm trying to create a small web app wherein in one form, the user may type in certain parameters as part of the message, then after he hits a button, it will show an Outlook (depends on his default email client) email client popup with all the details he placed.. and then it will include an attachment. the javascript code look...

jquery remove check box on condition

In a div there are these check boxes(name="val1") and after a certain operation these check boxes are removed <div name="navigation_b"> <label id="selectall"> select all <input type="checkbox" name="selectall" /> </label> <input type="checkbox" name="val1" /> <input type="checkbox" name="val1" /> ...

jQuery: hidden visibility selector does not work in Firefox 3.6

<html> <script src="../jquery.js" type="text/javascript"></script> <body> </body> <script type="text/javascript"> $(":hidden").show(); </script> </html> Firefox 3.6 would show $(":hidden").show();, but IE 8.0 works fine. Is this a bug? PS: I'm using jquery 1.4.2. Thanks. ...

Chrome browser window.showModaldialog

I am using the javascript to open a child window using window.showModaldialog(), i have retuen a value from the child page is working fine in IE and firefox but is not working in chrome browser, is there any work around or alternative for it to work in chrome as well. ...

Prototype Form Submit Validation Error

I have a form with id 'new_profile_choices', and I am using Prototype to validate the form. When I tried to validate the form submit event, it does not seem to handle the event. Could you please help me to debug it. Thanks View Source of the Form <form action="/polls/vote" class="new_profile_choices" id="new_profile_choices" method="po...

JS cookie setup

Hi i need setup cookie in parent page cookie. For example, parent site = "www.test.com" child site = "www.child.com" if child will run the parent cookie want set.. How can i do? please help me ...

Two ways of creating javascript objects, which one should I use?

These are the ways of creating javascript objects: function apple(optional_params) { this.type = "macintosh"; this.color = "red"; this.getInfo = function () { return this.color + ' ' + this.type + ' apple'; }; } var apple = { type: "macintosh", color: "red", getInfo: function() { return this....

javascript file in iphone...?

I want to make a calculator..all the calculation code is given in javascript file..I don't want to do all the calculation again..?can there is any method that can directly call the methods given in javascript file...? sample of javascript file is here--- function reset() { D6080One.resetAll(); D6080Multi.resetAll(); IsoOne.resetAll();...

assign Unique ID Jgrid Row

Hi, i am using Jgrid.i want when i add new row to the table each time it assign the new id to that row. I am adding the row using var AddNewRow = function(id){ var datarow = {Consultant:"",Role:"",Task:"",SDate:"",EDate:"", Deliverables:"",Complete:""}; ...

client side validation error

<%@ Page Language="C#" MasterPageFile="~/HomeMaster.master" AutoEventWireup="true" CodeFile="HomePage.aspx.cs" Inherits="Default2" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="cp1" Runat="Server"> <script language="javascript" type="text/javascript"> function checkInput() { var uname = document.ge...

How window.moveto function working on multiple tab open in browser?

Hi Experts, I have to maximiize my screen for mutiple tabs. window.moveto is not working. I am using this code: if(document.all) { top.window.resizeTo(screen.availWidth,screen.availHeight); } else if (document.layers||document.getElementById) { if(top.window.outerHeight < screen.availHeight || top.window.outerWidth < sc...

Javascript - Online CSS Editor

I'm searching for an online JavaScript CSS editor like this: Did somebody know of one? ...

Clientside validation of a textbox

I have an asp.net control textbox, clicking on which a jquery timepicker appears and user can select any time.But I want to validate the selected time so that it is one hour greater than the current time in the client side. I mean when textbox value will be changed it should be validated. Can anyone help me how to do this? ...

How to pass argument if event handler is assigned in initialization function?

It is always good to separate presentation layer and behaviour between HTML and Javascript based on head first book. They tell me not to do: <textarea onclick="showAlert()"></textarea> But instead, do below: The example below separate the behaviour from HTML code (structure). <html> <head> <script type="text/javascript"> window.on...

How to get subset of two arrays in javascript?

What I am trying to do is if I have Array a = {1,2,3,4}; b = {1,2}; Then I want subset array as c = {3,4}; Can anybody help me? ...

Find().find() doesn't work in Chrome.

$(document).find('.AddressGroup').find('.toggle_container').slideDown("1000"); works in IE & FIREFOX but not in CHROME or OPERA. Why? ...