javascript

Bing image search like endless scroll in Flex

Hi, I want to know if there is any existing implementation of 'endless scroll' in Flex ? I searched online but I could only find implementation in Javascript. What could be the pros/cons of having an 'endless scroll' component in Flex, which would be more efficient JS or Flex. Thanks ...

javascript created input[type="text'] doesn't post it's variable

hey there, I'm creating a series of input elements and for some reason their values aren't $_POSTing. Any light shed on the subject would be appreciated! My current code is as follows: javascript Afields = 1; function addAdultInput() { if (Afields != 10) { document.getElementById('adultMembers').innerHTML ...

Why is Javascript called Javascript, if it has nothing to do with Java?

Why Javascript is called Javascript (there is no relation between Java and Javascript) why its not called HTMLScript or XMLScript. Any historical reason for this? ...

How can I get opener's element with jQuery?

Just like in JavaScript: opener.document.getElementByName jQuery: ?? Is there any way to get opener's element with jQuery? ...

Can I cancel location.href in javascript

It might sound silly, but I need this functionality. Can I somehow cancel location.href = 'url' in javascript once it is executed? for example on click of button i am changing current page with some resource intensive page, I want to give an option to user so that one can cancel it if next page is going to take long time to load. Tha...

Bypassing Javascript form handler

We are writing an ASP.NET MVC application. By default, if the client browser has Javascript, the handler for every form on the page is set, by Javascript, to be one that sends the submission down an Ajax "pipe" (progressive enhancement). But, for one form (on a page of several), I'd like this handler to be bypassed/ignored. Is there a s...

Detecting when Javascript is performing poorly

I'm working on a webapp in jquery that, on older machines or machines without much resources, may perform poorly. To get around this I'd like to make a degraded version that disables some of the features, particularly those that rely on large images. How can I tell if my app is running poorly on the user's computer in jquery or javascri...

How to replace round bracket tag in javascript string

I have trouble with changing round bracket tag in Javascript. I try to do this: var K = 1; var Text = "This a value for letter K: {ValueOfLetterK}"; Text = Text.replace("{ValueOfLetterK}", K); and after that I get: Text = "This a value for letter K: {ValueOfLetterK}" What can be done to make this work? When I remove round brackets ...

Need to call Silverlight Handler event and then serverside event on Page submit.

I have a Silverlight control on page which has a upload control. the silverlight exposes some events such as StartUpload() => To start the file upload, StopUpload() => To stop the file upload if running, CheckFileStatus() => to check the status of the file upload. The page has aspx Submit button with onclientclick event and ocClick ...

Will cookie be available when javascript is disabled at client side?

This is one of the questions I'm asked in the interview today, but I'm not sure of the answer. ...

How to check if a Textarea is empty in Javascript or Jquery?

How do i check if a textarea contains nothing? I tryed with this code if(document.getElementById("field").value ==null) { alert("debug"); document.getElementById("field").style.display ="none"; } But it doesnt do what i expect. I expect that it should appear a messagebox "debug" and that the textarea is not shown. How can...

JS dynamic img change and SEO

Hi all, I've built a web site using jquery to make nice transitions between content. The code works this way: there are 2 imgs (body and footer) when I click on a link (instead of going to another page) I fade out the 2 imgs and change the src attribute of the 2. When the new imgs are loaded I fade them back in. I'm using SWFaddress ...

How to block non-browser clients from submitting a request?

I want to block non-browser clients from accessing certain pages / successfully making a request. The website content is served to authenticated users. What happens is that our user gives his credentials to our website to 3rd party - it can be another website or a mobile application - that performs requests on his behalf. Say there is ...

Problem in getting refernce to ajax extender control

hi, I am having problem in getting reference of Ajax control extender using $find() or $get or document.getElelmentById() functions in java script Can any one tell me how can to do this? Thanks in advance :) ...

JQuery hover problem

Hello, Im using jquery hover method to call a function as follows $(<some_element>).hover(function(){animate("next",true);},function(){}); But,the animate function is called only when the mouse enters the element. I want it to keep getting called as long as the mouse is over the element also. Any way to achieve this ? Thank You. ...

pass parameter from javascript to another jsp

I want to pass parameter from a Javascript function to another JSP page. Currently I am doing like this: function viewapplet(strPerfMonPoint) { var dateSelected = document.forms[0].hdnDateSelected.value; document.forms[0].hdnPerfMonPoint.value = strPerfMonPoint; var win; win = window.open("jsp/PopUp.jsp?GraphPerfMon="...

How to refresh parent and ancestor windows after closing the child windows?

Hi, I have three windows: 1st - main window 2nd - child window - it's opened using window.showModalDialog from 1st widnow. 3rd - window - is an ancestor of 1st window and is's opened from 2nd window using window.showModalDialog. And now what I need to achieve is to open 1, 2 and 3 window. Next after closing the 3rd one, refresh the 2nd...

How to let Html Link (anchor) do a postback to be like LinkButton?

Hello, I would like to ask how can i make an html anchor (a element) or even any object to do a postback or to execute an server side method? I want to create a custom button (a wrapped with some divs to do some custom them) and i want to implement OnClick to be look like the ASP.NET LinkButton? Like <a href="#" onclick="RunServerSideM...

Parsing JSON with eval

I have this code: function useHttpResponse() { if (xmlhttp.readyState==4 ) { var response = eval('('+xmlhttp.responseText+')'); alert(response); for(i=0;i<response.Users.length;i++) alert(response.Users[i].UserId); } } When i alert, the first alert is "[object Object]" Why is that so? I need to remove that...how? ...

Javascript review/refactoring tools

Hi, What are the available javascript review/refactoring tools? Thanks in advance. Thanks and Regards, SachinJadhav. ...