What are expando objects in javascripts?
For what purpose we need this ? Any complete example will be appreciated
I found 1 article here Javascript: The red-headed stepchild of web development
Thanks
I have been writing my first jQuery plugin and struggling to find a means to time how long different pieces of code take to run.
I can use firebug and console.time/profile. However, it seems that because my code executes so fast I get no results with profile and with time it spits out 0ms. (http://stackoverflow.com/questions/2690697/firebug-profiling-issue-no-activity-to-profile/2690846#2690846)
Is there a way to get the time at a greater level of detail that milliseconds in javascript?
I'm looking for articles or books that discuss schemes and techniques adopted by pro javascript developers to store and organize data with html tags. In other words, how to emulate xml data storage with html as semantically as possible.
Some various solutions that I've seen mentioned in passing are custom DTD, custom attributes with xhtml, early adoption of html5 and its data- attribute.
Now, I'm looking for some tangible material that goes in depth with these concepts.
I was implementing a routing algorithm in javascript, but when I assign a negative one variable in the array gives me this error: invalid array length.
var node = new Array()
node[0] = new Array(6,7)
node[1] = new Array(5,-4,8)
node[2] = new Array(-2) //Here, invalid array length
I do not know how to resolve this error.
I want to format dates in a specific format but I can't figure out how to add my date function to the JavasScript view engine in CouchDB. Preferably I would like to add my formatDate() function to the prototype Date object so it is available everywhere Does anyone know how to add this so that the CouchDB JavaScript View engine will see it?
I've been having a crack at some of the problems over at http://projecteuler.net/ with JavaScript. I've been using a simple html page and running my code in script tags so I can log my results in the browsers' console. When experimenting with loops I sometimes cause the browser to crash.
Is there a better environment for me to do this kind of development?
I think I have not got the syntax correct for writing a javascript function and calling it to assign its return value to a variable.
My function is:
getObjName(objId){
var objName ="";
$.ajax( {
type : "GET",
url : "Object",
dataType: 'json',
data : "objId="+objId,
success : function(data) {
objName = data;
}
});
return objName;
}
I am trying to call it and assign it to a variable with:
var objName = getObjName(objId);
However Eclipse is telling me that "the function getObjName(any) is undefined"
Applet Communication:
write a small applet and embed it in html-file with following functionality.
1. change applet bg color by receiving a javascript command with the color parameter.
2. show dynamic mouse position in applet-window and display position in html-site. use live-connect between applet and browser communication.
just wondering if anyone knows anything of using javascript to set html to new content instead of linking to new pages, if this is generally a bad idea or if it kind of hurts SEO(which im kind of new to)
Basically the home page displays given content, and the links to like contact pages and stuff, just change the body content to what would normally be a separate html page. my OCD kinda bugs me when pages reload and either flash the background or its offset somehow, so i wanted to know if making sites like this was a bad idea or whatever-
i suppose at the least, i could create duplicates/hidden pages for SEO purposes
I Have a PerformancePoint Server 2007 Dashboard in a Sharepoint 2007 page.
In my Sharepoint page, there's 2 Filters who get passed to the Report, and I need to print this report in the page (in another button, not the SSRS one).
So what I need is a javascript method that calls the SSRS print button, which is on a named DIV, inside a WebPartZone that only have one WebPart, a PerformancePoint Dashboard Item (don't know the exact name of the webpart).
I want to pass data to id
<script language="javascript" src="/foo.aspx?id=1"></script>
I have this code in a aspx page.
The data should be passed on load, before this code is being executed.
how can i do that?
bunch of thanks.
Is there a way to add a method to all javascript functions without using the prototype library?
something along the lines of :
Function.prototype.methodName = function(){
return dowhateverto(this)
};
this is what i tried so far but it didnt work. Perhaps it is a bad idea also if so could you please tell me why?
if so can I add it to a set of functions i choose
something like :
MyFunctions.prototype.methodName = function(){
return dowhateverto(this)
};
where MyFunctions is an array of function names
thank you
Hi all, i want to ask that, is it possible to show any part of image in img tag (with pixels) via Javascript.
I mean, i'll prepare a big image (e.g. 32x320 pixels) and i'll define starting position (X,Y , e.g. 0,32) and width/height (e.g. 32,32), so script will show second (32x32 pixel) part of main image..
I hope i can explain.
Thanks right now..
Trying to do something similiar to how sourceforge starts the download on the page, and uses a direct link in case it doesn't work.
I can't seem to locate the javascript they use to start the downlaod popup.
Exampe link: http://sourceforge.net/projects/htmlparser/files/Integration-Builds/2.0-20060923/HTMLParser-2.0-SNAPSHOT-bin.zip/download
I'm looking for a decent book or online resource to help me learn about developing large Javascript applications.
There are lots of books that go over the fundamental and advanced features of JS, but I'm looking for something which covers application structure, coding practices etc.
Any ideas?
I have a page that I made that is going to be used for retrieving shipping rates from UPS by entering the weight and zip. Everything works fine but what I want to add to it is the ability for the user to choose something on a form and have it update the value in a different form box. I think this is done with javascript. Any suggestions will help.
I have a div tag
<div id="img"> <div>
and a script in page
<script type="text/javascript">
function img(){
document.getElementById('img').innerHTML="<a href="/lime/link.html"><img src="/lime/img.png"></a>";}
</script>
how to put the image on the div with link on pageload.
Hello,
I'm running into a scenario where at random times I am getting "Access Denied" when executing javascript. It is not repeatable and occurs in random places of my application. There is not indication of what is causing it in the logs and I'm really at a loss on this. It seems to be UI problem only. However, there is no reason it should appear as I do not have any such permission checking to could be getting triggered.
Thanks in advance
Is there a way in javascript to detect all images in a document, including those that may be loaded asynchronously (and maybe after the DOM is ready)?
I'm looking to create a function that can detect if Google Analytics has been loaded by searching through the DOM looking for "__utm.gif". document.images doesn't seem to hold this image as it's loaded asynchronously and not displayed.
Hi, I have many controls in table and I want to disable all the controls using JavaScript upon clicking of some checkbox.
I have google and found that we can't disable table instead all controls through loop.
Please suggest me, what is better idea
Thanks
I'm developing an application with javascript. What I need is to have divs with id's (1,2,3...) and be able to insert a div between, for example, 2 and 3, with jquery, and then have that be the new three, and three becomes four, four becomes five, etc. I've got the div insertion working, I just need to know how to reorder the divs. Any ideas?
Is there any way to cleanup JavaScript code?
I want to enable users to post arbitrary JS but i want to filter some of it out, like eval and document.write. Do you know of any tool that can do this?
Hello experts,
I need to pass javascript function as a parameter value to the ajax actionlink in asp.net mvc app. how can we achieve this?
Thanks in advance.
Hi,
I've read that you can disable (make physically unclickable) a html button simply but appending 'disable' to its tag, but not as an attribute, as follows:
<input type="button" name=myButton value="disable" disabled>
Since this setting is not an attribute, how can I add this in dynamically via JavaScript to disable a button that was previously enabled?