Search Results

Search found 28 results on 2 pages for 'javasript'.

Page 1/2 | 1 2  | Next Page >

  • Actionscript can't call javasript from locally-saved html

    - by Dmitry Sapelnikov
    I try to perform calling of a javascript function from actionscript 3.0 thru ExternalInterface.call(). I've seen a lot of online examples where the method works perfectly. But all downloaded copies of the examples don't work. Flash player can't call javasript due to the swf-html container security problems. I've already tried to set allowScriptAccess value from "sameDomain" to "always". It haven't solved the problem.

    Read the article

  • javasript function

    - by user289346
    var curtext="View large image"; function changeSrc() { if(curtext == "View large image"){ document.getElementById("boldStuff").innerHTML ="View small image"; curtext="View small image"; } else{ document.getElementById("boldStuff").innerHTML="View large image"; curtext="View large image"; } } var curimage="cottage_small.jpg"; function changeSrc(){ if(curimage == "cottage_small.jpg"){ document.getElementById("myImage").src="cottage_large.jpg"; curimage="cottage_large.jpg"; } else{ document.getElementById("myImage").src="cottage_small.jpg"; curimage="cottage_small.jpg"; } } </script> </head> <body> <!-- Your page here --> <h1> Pink Knoll Properties</h1> <h2> Single Family Homes</h2> <p> Cottage:<strong>$149,000</strong><br/> 2 bed, 1 bath, 1,189 square feet, 1.11 acres <br/><br/> <a href="#" onclick="changeSrc()"><b id="boldStuff" />View large image</a></p> <p><img id="myImage" src="cottage_small.jpg" alt="Photo of a cottage" /></p> </body> I need help, how to put as one function with two arguments. That means when you click, the image and text both will be change. Thank you! Bianca

    Read the article

  • Extending Object in Javasript

    - by smsteel
    I'm trying to extend Object functionality this way: Object.prototype.get_type = function() { if(this.constructor) { var r = /\W*function\s+([\w\$]+)\(/; var match = r.exec(this.constructor.toString()); return match ? match[1].toLowerCase() : undefined; } else { return typeof this; } } It's great, but there is a problem: var foo = { 'bar' : 'eggs' }; for(var key in foo) { alert(key); } There'll be 3 passages of cycle. Is there any way to avoid this?

    Read the article

  • Google Closure: Setting Input for AutoComplete Dynamically

    - by amuzed
    The Google Closure (GC) Javascript Library makes it very easy to create an AutoComplete UI, as this demo shows - http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/autocomplete-basic.html . Basically, all we have to do is define an array and pass it on as one of the parameters. I'd like to be able to update the array dynamically and have AutoComplete show the changes immediately. Example, if there are two arrays list1 = ["One", "Two", "Three"] list2 = ["1", "2", "3"] and an AutoComplete has been initialized using list1, var suggest = new goog.ui.AutoComplete.Basic(list1, document.getElementById('input'), false); how can I update the existing AutoComplete (suggest) to use list2?

    Read the article

  • How can I possibly sort this in JavaScript?

    - by orokusaki
    I've been pounding my head on the wall trying to figure out how to sort this in JavaScript (I have to work with it in this format unfortunately). I need to sort it based on Small, Medium, Large, XL, XXL (Small ranking the highest) in each variationValues size field. The problem is that I need to sort the variationCosts and variationInventories at the same time to match the new order (since each value in order corresponds to the values in the other fields :( Input I have to work with var m = { variationNames: ["Length", "Size" ], variationValues: [ ["26.5\"", "XXL"], ["25\"", "Large"], ["25\"", "Medium"], ["25\"", "Small"], ["25\"", "XL"], ["25\"", "XXL"], ["26.5\"", "Large"], ["26.5\"", "Small"], ["26.5\"", "XL"] ], variationCosts: [ 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00 ], variationInventories: [ 10, 60, 51, 10, 15, 10, 60, 10, 15 ], parentCost: 20.00 }; Desired output var m = { variationNames: ["Length", "Size" ], variationValues: [ ["25\"", "Small"], ["26.5\"", "Small"], ["25\"", "Medium"], ["25\"", "Large"], ["26.5\"", "Large"], ["25\"", "XL"], ["26.5\"", "XL"] ["25\"", "XXL"], ["26.5\"", "XXL"], ], variationCosts: [ 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00 ], variationInventories: [ 10, 10, 51, 60, 15, 15, 15, 10, 10 ], parentCost: 20.00 };

    Read the article

  • JavaScript Validation

    - by Sandeep Pathak
    Have a text field in the jsp which shows and takes input for ftp Url like below : ftp://ftplog:*****@10.203.291.177/abc/DS/Simulator/B11/B11/L2 The password field above is masked . Now when user tries the edit say ftp to sftp or File Path , He should re-type the password too , other wise What I will be getting in server is only "*" . Can somebody suggest the best way of validating this . It has a lot of test cases that has to be taken care of . Thanks .

    Read the article

  • Display calculating result in the same page

    - by garcon1986
    Hello, I have a table in my php code. In the second column of the table, normally it displays "---", and after i click the submit button, it will display the calculating result in the same page. For example, <table> <tr><td>1</td><td>---</td></tr> <tr><td>2</td><td>---</td></tr> <tr><td>3</td><td>---</td></tr> </table> And in the same page, it should receive the variables $var1 = $_POST['variable1']; I'm not sure which way to use, ajax or javascript or just css? Do you have any ideas? Thanks

    Read the article

  • Does disabling third party cookies also disable cookies created by third party javasript?

    - by Sean
    When a page includes third party javascript (via script src=...) and that javascript that sets a cookie, that cookie "becomes" a first party cookie, even though it's originally set by a third party source. My question is this. If someone has disabled third party cookies in their browser, does that also apply cookies set by third party javascript? Or does it only block cookies that are explicitly set in the headers for requests to the third party domain? And either way, do all browsers handle this the exact same way or do some block javascript cookies but others allow it?

    Read the article

  • how to get multiple value from one textbox in javasript?

    - by angel ansari
    hi, I have created web application and textbox as a textarea.i am using javascript for validation.When i enter value in text box so it should be number not alphabet i have use textmode is multiple line. My problem is that how i get multiple value from textbox and store in array in javascript and check each value is number or not.I am using the web form.Please help me.

    Read the article

  • JavaSript / CSS: Get the size in 'px' instead of percents.

    - by Andrei Ciobanu
    Hello, I have to write a javascript function that is returning the current size (in px) of a div. Unfortunately the div has its weight specified in % instead of px. The style of the div: position: absolute; width: 100%; height: 100%; And my width returning function: function getTableWidth(tableId){ var tabWidth = document.getElementById('pt1::tabb').children[0].children[0].style.width; return tabWidth; } tabWidth is '100%'. Is it possible to return the px width instead of the % width ? NOTE: I don't have access to any html/css , as the page I am working on is generated through a complex framework. I can only embed javascript.

    Read the article

  • CodeLobster PHP Edition 4.0.1 disponible : l'éditeur portable gratuit pour le Web rationalise et simplifie le processus de développement

    CodeLobster PHP Edition 4.0.1 disponible : l'éditeur portable gratuit pour PHP HTML, CSS, JavaScript rationalise et simplifie le processus de développement Web CodeLobster PHP Edition, l'environnement de développement Web gratuit est actuellement disponible en version 4.0.1. CodeLobster PHP Edition rationalise et simplifie le processus de développement en PH. Il propose un EDI pour les langages HTML, PHP, JavaSript et CSS, avec autocomplexion et coloration syntaxique. Le code mixte est encouragé, si bien que le domaine HTML sera mis en valeur en tant que HTML, le PHP en tant que PHP, et Javascript en tant que Javascript dans le même dossier. Pour PHP, la structu...

    Read the article

  • Need help with DOJO

    - by Vani
    I am trying to integrate DOJO to my existing struts application. Listed below are the steps I followed. 1.Downloaded DOJO 1.4, copied dijit,dojo and dojox folders under my application folder jsp-jsDOJO copy paste "dialog via mark up example" (http://www.dojotoolkit.org/reference-guide/dijit/Dialog.html#dijit-dialog) When I run the application, I am getting javasript error dojo undefined. What I am missing?

    Read the article

  • Static code analysis tools

    - by Anil Namde
    Whether JavaSript, C# or C++ main problem i face while reading the code is which function is called by which function. This problem is big when dealing with BIG code. Is there any static code analysis tool/technique/plugins using which a graphical representation of the code can be generated(something like below) so that reading/analyzing code becomes easy? .... --outerFuntion() ---innerFunction() ----innerFunction2() --outerFunction2() .... Please provide your inputs/opinions on this Thanks all,

    Read the article

  • Ideal data structure/techniques for storing generic scheduler data in C#

    - by GraemeMiller
    I am trying to implement a generic scheduler object in C# 4 which will output a table in HTML. Basic aim is to show some object along with various attributes, and whether it was doing something in a given time period. The scheduler will output a table displaying the headers: Detail Field 1 ....N| Date1.........N I want to initialise the table with a start date and an end date to create the date range (ideally could also do other time periods e.g. hours but that isn't vital). I then want to provide a generic object which will have associated events. Where an object has events within the period I want a table cell to be marked E.g. Name Height Weight 1/1/2011 2/1/2011 3/1/20011...... 31/1/2011 Ben 5.11 75 X X X Bill 5.7 83 X X So I created scheduler with Start Date=1/1/2011 and end date 31/1/2011 I'd like to give it my person object (already sorted) and tell it which fields I want displayed (Name, Height, Weight) Each person has events which have a start date and end date. Some events will start and end outwith but they should still be shown on the relevant date etc. Ideally I'd like to have been able to provide it with say a class booking object as well. So I'm trying to keep it generic. I have seen Javasript implementations etc of similar. What would a good data structure be for this? Any thoughts on techniques I could use to make it generic. I am not great with generics so any tips appreciated.

    Read the article

  • Overview of getting and setting the URL and parts of the URL using angularjs and/or Javascript

    - by Sandy Good
    Getting and Setting the URL, and different parts of the URL are a basic part of Application Design. For Page Navigation Deep Linking Providing a link to the user Querying Data Passing information to other pages Both angularjs and javascript provide ways to get/set the URL and parts of the URL. I'm looking for the following information: Situation: Show a simple URL in the browser address bar to the user Provide a more detailed URL with string parameters to the page that the user will not see. In other words, two different URLs will be used, one simple one that the user sees in the browser, a more detailed one available to the page on load. Get URL info with PHP when then page intially loads, both don't reload the PHP page when the user needs more detailed info that is already loaded but not displayed yet. Set the URL with a more detailed URL for deep linking as the user drills down to more specific information. Get URL info in a controller or JavaSript when angularjs detects a change in the URL with routing. Hash or Query String or Both? Should I use a hash # in the URL, a string ?= or both? Here is what I currently know and what I want: A Query String HTTP:\\www.name.com?mykey=itemID will prevent angularjs from reloading the page. So, I can change the URL by adding/changing the string at the end, thereby providing new info to the page, and keep the page from reloading. I can change the URL and force a page reload with: window.location.href = "#Store/" + argUserPubId + "?itemID=home"; If home is the itemID string, I want code to simply load the page, and not display more detailed information. If there is a real itemID in the URL query string, I want the code to display the more detailed information. Code from angularjs will run either from the controller specified in the routing, or a controller specified in the HTML, or both. The angularjs code specified in the routing seems to run first, before the code specified in the HTML. A different URL for the page can be used in angularjs templateURL: than the URL that was sent to the browser address bar. when('/Store/:StoreId', { templateUrl: function(params){return 'Client_Pages/Stores.php?storeID=' + params.StoreId;}, controller: 'storeParseData' }). The above code detects http:\\www.name.com\Store\StoreID in the browser, but SENDS http:\\www.name.com\Client_Pages/Stores.php?storeID=StoreID to the page. In the above code, a function is used for the angularjs routing templateURL: to dynamically set the templateURL. So, when the user clicks something to see details of an item, how should I configure the URL? Should I use angularjs $location or window.location.href ? Should I use a longer URL with more parameters, a hash bang, or a query string? Should I use: http:\\www.name.com\Store\StoreID\ItemID or http:\\www.name.com\Store\StoreID#ItemID or http:\\www.name.com\Store\StoreID?ItemID or http:\\www.name.com\Store#StoreID?ItemID or Something else?

    Read the article

  • How to safely transfer reference to object across window?

    - by Morgan Cheng
    I'm debugging a web application. Javasript in one window create one object and use it as argument to invoke global method in another window. Pseudo code is like below. var obj = new Foo(); anotherWin.bar(obj); In anotherWin, the argument is stored in global variable. var g_obj; function bar(obj) { g_obj = obj; ... } When other function tries to reference g_obj.Id, it throws exception "Cannot evaluate expression". This happens in IE8.0.7600.16385 on Windows 7. In Visual Studio debugger, when this exception happens, the g_obj shows as {...} It looks all its properties are lost. Perhaps the root reason is the object is created in one window but only referenced in another window. The object might be garbage-collected at any time. Is there any way to work around this?

    Read the article

1 2  | Next Page >