javascript

Inline functions and other method's scope.

How do I make the myFunction visibile for the in-line function in .ready() event? $(document).ready(function() { ...stuffs... myFunction(par1, par2, anotherFucntion_callback); } ); function anotherFunction_callback(data) { ..stuffs.. } ...

How to invoke js without displaying the code

Hello, I was wondering, I want to plant a JS tracking code (analytics) in a few websites to track their traffic. But I don't want that when viewing the site's source code people will be able to see that I've embedded the JS tracking code there. Is it possible? Maybe by using an Apache/PHP trick? Thanks, Roy. ...

Javascript/Silverlight proxy double load delay.

I am creating a Silverlight application which will be heavily javascripted against. To enable JS interaction, I have created the following SL class: [ScriptableType] public class JavaScriptProxy { private string _version; // provided for testing SL-JS integration [ScriptableMember] public void SmokeTest() { HtmlPage.Wi...

hour format in javascript

hi guys, In my javascript iam using GetHour and GetMinutes function.For eg:Current Time is 2:03.If in this case i use GetHour(),it returns 2.Instead i need 02.Can anybody help? ...

How do I hook up javascript to my CustomValidator control in .Net

I have created a CustomValidator control public class MyValidator :CustomValidator, IScriptControl {} and also created the equivalent client script. The server validation works fine, however how do I hook up my client script? The rendered javascript looks like var MyValidator1 = document.all ? document.all["MyValidator1"] : documen...

JQuery : Event for a button

Dear all I am newbie to jQuery and loves it Can any one give me a small jQuery code snippet to Show an alert/Div when a button (with id btnSave ) being clicked . ...

Style input file and auto submit

Hello, I am trying to have a single text link on which the user clicks and it asks the user which file he/she wants to upload then, auto matically POSTs it to the form. How can I achieve the same? I know I have to style my file input but how to get it to post automatically on file selection? Thank you very much ...

Jquery tab postback

Hi, I am using jquery remote tab with asp.net to load my .aspx pages.The problem is if suppose i have a main page called "Parent.aspx" which contains the jquery tab and child page "Page1.aspx" which is loaded via remote tab into the "Parent.aspx".When i click on a server side button on my Page1.aspx, the whole window redirects to the Pag...

Calling Javascript from XSL file

I have a XML file........ <ROOT> <MYNODES> <MYNODE>A</MYNODE> <MYNODE>B</MYNODE> <MYNODE>C</MYNODE> <MYNODE>D</MYNODE> </MYNODES> <DOCS> <DOC>1</DOC> <DOC>2</DOC> <DOC>3</DOC> </DOC> <PICS> <PIC>a.jpeg</PIC> ...

Jquery trigger file input

Hello, Am trying to trigger an upload box (browse button) using jquery. But it doesnt seem to work. $('#fileinput').trigger('click'); Please help. Thank you. ...

read javascript source

In my html file I put as <script src='http://otherdomain/file.js' ></script> When I run my webpage, that other javascript creates some html content using docuemnt.write command. How can I dynamically read that dynamic html using the javascript on my html page? Is it possible? ...

Wait until function is loaded

How can I in jQuery test when a javascript function is fully loaded? I would like to use a gif, which displays loading, while the javascript function loads, and hide it when the function is fully loaded? ...

Retain anchor after postback in asp.net

I'm using a coda slider like consctuct on one of my pages. Naturally, the anchor ("#currentTab") information is lost after a postback. This is annoying because when you press a button on a certain tab, you always end up on the first tab after the postback. What is the best way of letting this information survive a postback? ...

Getting a integer value from a textbox, how to check if it's NaN or null etc?

I am pulling a value via JavaScript from a textbox. If the textbox is empty, it returns NaN. I want to return an empty string if it's null, empty,etc. What check do I do? if(NAN = tb.value) ? ...

Svg charting library

Do you know if there's any SVG + js charting library out there similar to http://www.amcharts.com/ (Flash). I need to provide nice looking interactive chart functionality in a browser that does not support Flash but supports SVG. ...

Javascript AES encryption

Is there a library available for AES 256-bits encryption in Javascript? ...

Auto Slider / Scroller to display dynamic content

Can any one tell me how can i implement a auto slider/scroller in my web page. The slider should show dynamic data from a database. (Ex : Hot jobs tab in the plipl.com site's home page (www.plipl.com) . Is there any easy way to do this with jQuery ? ...

Google Maps Directions call problem

Hi. I've got a problem with calling a function that should draw a route on a map. For some reason it just returns null. My code from maps.js (some of it) var map = null; var gdir = null; function initialize() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(55.86...

Getting file names with scriptaculous.

I am looking to create basically an image rotator with scriptaculous. The trick is I want to use the images that are in a certain directory to drive the rotations. For Example if there are 3 files in the directory then it rotates with 3 images, 5 it will rotate five images. How can I read the file names to use/determine for Script...

Learning JavaScript for a total non-programmer

I code CSS/XHTML like it should be my mother language, and I do write valid, semantic code following guidelines of accessibility and such. But I want to learn Unobtrusive JavaScripting, but with a total non-programmer brain I need some motivation / tips / etc., like what's the best way to learn it, and how long does it take/did it take...