Search Results

Search found 28881 results on 1156 pages for 'javascript is future'.

Page 7/1156 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Javascript Running slow in IE

    - by SharePoint Newbie
    Hi, Javascript is running extremely slow on IE on some pages in our site. Profiling seems to show that the following methods are taking the most time: (Method, count, inclusive time, exclusive time) JScript - window script block 2,332 237.98 184.98 getDimensions 4 33 33 eh 213 32 32 extend 446 30 30 tt_HideSrcTagsRecurs 1,362 26 26 String.split 794 18 18 $ 717 49 17 findElements 104 184.98 14 What does "JScript - window script block" do? We are using jquery and prototype. Thanks,

    Read the article

  • Capture link clickthrough events from Javascript

    - by Silver Dragon
    In order to track the overall user clickstream, I'd like to fire a javascript event, if the user right-clicks, and select "Open in new Tab" (or middle-clicks in most browsers) on a link. Most of these links are linking outside of my site, and I'd like to interfere with overall browser experience (such as: status bar, etc) as little as possible. What options are there to solve this?

    Read the article

  • Divs over images using JavaScript

    - by Abhi
    Say I have an image with a couple of dots in a web page. When someone clicks on the dots I want a JavaScript function to be executed and then a div placed over the clicked dot in the image. Something akin to markers in maps. How do I go about doing this?

    Read the article

  • shuffling array javascript

    - by Dennis Callanan
    <!doctype html> <html lang="en"> <head> <meta charset="utf=8" /> <title>Blackjack</title> <link rel="stylesheet" href="blackjack.css" /> <script type="text/javascript"> var H2 = 2; var S2 = 2; var D2 = 2; var C2 = 2; var H3 = 3; var S3 = 3; var D3 = 3; var C3 = 3; var deck = new Array(H2, S2, D2, C2, H3, S3, D3, C3); var new_deck = new Array(); var r; document.write("deck = ") for (r =0; r<deck.length; r++){ document.write(deck[r]); } document.write("</br>") document.write("new deck = ") for (r=0; r<new_deck.length; r++){ document.write(new_deck[r]); } document.write("</br>") for (r=0;r<deck.length;r++){ var randomindex = Math.floor(Math.random()*deck.length); new_deck.push(randomindex) deck.pop(randomindex) } document.write("deck = ") for (r =0; r<deck.length; r++){ document.write(deck[r]); } document.write("</br>") document.write("new deck = ") for (r=0; r<new_deck.length; r++){ document.write(new_deck[r]); } document.write("</br>") </script> </head> <body> </body> </html> Obviously this isn't the full Blackjack game here. It's just a test to see if shuffling the array works by printing the contents of both decks (arrays) before and after the shuffle. I'm only using 8 cards at the moment, 4 2's and 4 3's. What I am getting from this is: deck = 22223333 new deck = deck = 2222 new deck = 7502 What I'm hoping to get is: deck = 22223333 new deck = deck = new deck = 23232323 (or any of the 8 numbers, generated randomly) So it should be shuffling those 8 cards, what am I doing wrong? I'm only new to javascript but I've used some python before. I've done something similar in python and worked perfectly, but I'm not sure what's wrong here. Thanks for any answers in advance!!

    Read the article

  • Javascript get anchor href on click

    - by Infinity
    Hello guys! How can I get the href of an anchor when I click on it using javascript? I did the following: document.onClick = myFunc(); function myFunc() { } But how to extend the function to respond only to clicks on anchors and get the href?

    Read the article

  • javascript object's - private methods: which way is better.

    - by Praveen Prasad
    (function () { function User() { //some properties } //private fn 1 User.prototype._aPrivateFn = function () { //private function defined just like a public function, //for convetion underscore character is added } //private function type 2 //a closure function _anotherPrivateFunction() { // do something } //public function User.prototype.APublicFunction = function () { //call private fn1 this._aPrivateFn(); //call private fn2 _anotherPrivateFunction(); } window.UserX = User; })(); //which of the two ways of defining private methods of a javascript object is better way, specially in sense of memory management and performance.

    Read the article

  • Date object javascript

    - by Isis
    Hello. var date = new Date();//Mon Mar 15 2010 12:40:05 GMT+0300 (MSK) var omg = date.getDate() + 19;// 34 date.setDate(omg); document.write(date.toLocaleString()); //Sat 03 Apr 2010 12:43:00 PM MSK How do I echo the values 3 (ie: day of month), 4 (April) and the current year? alert(day); // Need 3 alert(month); // Need 4 Thank you

    Read the article

  • JavaScript local alias pattern

    - by Latest Microsoft Blogs
    Here’s a little pattern that is fairly common from JavaScript developers but that is not very well known from C# developers or people doing only occasional JavaScript development. In C#, you can use a “using” directive to create aliases of namespaces Read More......(read more)

    Read the article

  • Best IDE for HTML, CSS, and Javascript for mac [closed]

    - by jon2512chua
    I'm currently looking to move to using an IDE for web development. The options I'm considering are: Aptana Studio Coda Expresso Please base your answers on the following criteria, in descending order of importance: Supports HTML, CSS, JavaScript Powerful (having good code completion, good debugger, great syntax highlighting etc) Fast and light Supports HTML5, CSS3, and major JavaScript frameworks (JQuery or YUI) Great design (both usability and aesthetics) Supports PHP, Ruby, and Python Has Git integrated I've updated the question to be more objective. I'm mainly looking for an answer that addresses how well each of the IDEs addresses my criteria.

    Read the article

  • Learning how to integrate JavaScript with other languages

    - by beacon
    After learning JavaScript syntax, what are some good resources for learning about integrating JavaScript with other languages (HTML, XML, CSS, PHP) to create real, useful applications? I'm most interested in reading articles or other people's code - not so interested in books. Basically, I'm looking to move from programming puzzle-solvers to programming complex applications and could use some advice.

    Read the article

  • TypeScript or JavaScript for noob web developer [closed]

    - by Phil Murray
    Following the recent release by Microsoft of TypeScript I was wondering if this is something that should be considered for a experienced WinForm and XAML developer looking to get into more web development. From reviewing a number of sites and videos online it appears that the type system for TypeScript makes more sense to me as a thick client developer than the dynamic type system in Javascript. I understand that Typescript compiles down to JavaScript but it appears that the learning curve is shallower due to the current tooling provided by Microsoft. What are your thoughts?

    Read the article

  • Tools for building long-running Javascript webapp

    - by FilipK
    Given my lack of familiarity with such tools, could you suggest what tools / frameworks would be suitable for developing a long-running JavaScript webapp? The webapp would display a constantly updating chart. The updates would come through WebSockets (preferably) or XmlHttpRequest. I know and have written JavaScript with JQuery, but for this task I assume something like backbone.js or ExtJS would be appropriate (or maybe not?).

    Read the article

  • JavaScript: catching URI change

    - by ptrn
    I have a site where I'm using hash based parameters, eg. http://url.of.site/#param1=123 What I want When the user manually changes the URI to eg. http://url.of.site/#param1=789 When the user enters this URI, the event is caught by the JavaScript, and the appropriate functions are called. Basically, what I'm wondering about is; is there an event listener for this? Or would I have to periodically check the URI to see if it has been changed? I'm already using the current jQuery API, if that helps. _L

    Read the article

  • JavaScript inline events syntax

    - by Mic
    Is there any reason to use one of the following more than the others: <input type="button" value="b1" onclick="manageClick(this)" /> <input type="button" value="b2" onclick="manageClick(this);" /> <input type="button" value="b2" onclick="manageClick(this);return false;" /> <input type="button" value="b3" onclick="return manageClick(this);" /> <input type="button" value="b4" onclick="javascript:return manageClick(this);" /> And please do not spend your valuable time to tell me to use jQuery or attachEvent/addEventListener. It's not really the objective of my question.

    Read the article

  • Leaving out type="text/javascript" language="javascript"

    - by coffeeaddict
    Most of the script tags I create, I always include type="text/javascript" language="javascript" in the tag. My boss however does not. Sometimes he excludes both, sometimes just has language=javascript even without the quotes Now we have not had an issue in any of the major browsers with his tags. I'm talking about all versions of IE, FF, Safari, and Chrome. Personally I feel it's laziness and just totally improper and bad coding practice to leave stuff out like this even if it works without it. Anyone know if both should be included or just one or is it ok to leave both out in ASP.NET?

    Read the article

  • Server Side Javascript

    - by XGreen
    Hi all, I can't help to see in many sites I visit the enthusiasm about server side javascript and the appealing look of a single language governing all tiers of the site. Mozilla Rhino, Aptana Jaxer and various John Resig's articles are some of the highlights of my search. I wanted to ask for some input from you guys on SO. your opinions and preferably experience in this. I do most of the data access and business logic currently either with asp.net or php depending on the hosting package of the client. Is anyone among you who's gave up these for ssjs?

    Read the article

  • JavaScript Intellisene Problem?

    - by James Wiseman
    I've got an issue with JavaScript intellisense in Visual Web Developer 2008, which I'm starting to believe is "just one of those things", but thought I'd ask here just to check. I have a file MyOtherFile.js with a function GetRandomNumber() defined like so: function GetRandomNumber() { /// <summary> /// Summary description for GetRandomNumber /// </summary> return Math.random(); } When I reference this from another file, screen.js (/// <reference path="MyOtherFile.js" />) I get the intellisense as expected with the summary text as above. If, however, I call the function GetRandomNumber from within its own file (MyOtherFile.js) then I don't get the sumamry description. Any thoughts? Thanks.

    Read the article

  • Test whether image loaded correctly with JavaScript

    - by johkar
    I have an image deployed on several application servers (green up arrow: uparrow.gif). I have an application server status page where I list out all the servers and with a corresponding image where the image's source is the uparrow.gif for that server. If the image does not load (server down) I would like to switch to a red down arrow (downarrow.gif). Is there a way to check whether an image loaded or not with straight JavaScript (no JS libraries etc)? I would imagine I would set an interval for it to continue checking if the user were on the page. Thanks.

    Read the article

  • Modify url for bookmarking using JavaScript

    - by jamesaharvey
    I'm exploring my options for modifying urls in the browser bar for bookmarking purposes. Ideally, I'd like to add querystring parameters and cannot determine if this is even possible. I don't want the page to refresh and want to add querystring values on link clicks, ajax calls, etc. If I can't add querystring parameters, then I'd like to add hash values (http:://someurl.com#hash-value). How should I go about doing this? Should I use plain JavaScript or a framework (jquery, prototype, etc.) and/or framework plugin.

    Read the article

  • Running custom Javascript on every page in Mozilla Firefox

    - by saturn
    I have a custom piece of Javascript which I would like to run on every web page from specific domains, or perhaps simply on every web page. (If you are wondering: it is not malicious. It allows to display formulas by using MathJax.) Is that possible? I tried including it in userContent.css, that of course did not work. A simple Greasemonkey script I tried did not insert it. Is it because of the security precautions? (Which would be very logical). Still, there should be a way to do it on the machine I physically control, by changing something in Mozilla chrome directory, shouldn't it? Anyway, how can I do this for myself?

    Read the article

  • Why javascript IF only works one time?

    - by Emily
    I have javascript code which copy the value of input file and past it in the text box in real time. <script> function copyit(){ var thephoto=document.getElementById('thephoto').value; var fileonchange=document.getElementById('fileonchange').value; if(!thephoto==fileonchange){ document.getElementById('fileonchange').value=thephoto; } } window.setInterval("copyit()", 500); </script> Choose File : <input type="file" id="thephoto"><br> Here Is the file name : <input type="text" id="fileonchange"> Sadly this only works one time and then stops pasting the value when changing the file again. ( i mean you should reload the page to works again) Is IF has a cache or something? you can try the code by yourself to see. Thank you all

    Read the article

  • click() (javascript) method is not working in FF

    - by Bragaadeesh
    Hi, The following code is throwing two alerts as expected in IE but not in Firefox. Please help. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- function myFunction(){ alert('myfunc'); document.getElementById('mylabel').click(); } //--> </SCRIPT> </HEAD> <BODY> <p id='mylabel' onclick="alert('you reached');"></p> <input type='button' value="Click me" onclick='myFunction();'/> </BODY> </HTML> Thanks

    Read the article

  • Drag and drop an image from desktop to a web text editor (implementation in javascript)

    - by fatmatto
    I tried to write reasonably short title but i failed i guess.. Hi everybody here's what i'm trying to do: I want to implement a web text editor able to recognize when the user drag a image file over it's editing surface and it automa(gically) starts the upload and insert the image near the cursor position. In other words i don't want the user to do the usual "insert-image-browse-ok". Atm i am not very good at javascript ... i know JQuery but i have not a clear idea about how to implement this... i don't know if there's an event handler able to help me in this situation... if not then there should be i think or web apps would miss some kind of interactivity. I've heard miracles about HTML5 could it help me? I've seen such things in Google Wave but that surface doesn't seem to be a form field... google lab's black magic i guess.... Thank you in advance.

    Read the article

  • Switching Javascript Function states

    - by webzide
    Dear experts, I would like to implement a API of Javascript that sort of resemble a light switch. For instance, there are two buttons on the actual HTML page act as the UI. Both of the buttons have event handlers that invokes a different function. Each function have codes that act like a state, for instance. button1.onclick=function (){ $("div").click( //code effects 2 ) } button2.onclick=function (){ $("div").click( //Code effects 2 ) } I the code works fine on the surface but the 2 state functions overlap. the effects is going to take place for the rest of the way until the next reload of the document. Basically what I want to achieve is that when 1 button is clicked, it will switch "OFF" the state of function invoked by the other button and vice versa. Thus, the effects achieved are unique are not overlapped. Is there anyway to achieve this or could any experts point me to the right direction. Thanks in advance.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >