Search Results

Search found 23794 results on 952 pages for 'serverside javascript'.

Page 82/952 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • Display label character by character using javascript

    - by Muhammad Sajid
    Hi, I am creating Hang a Man using PHP, MySQL & Javascript. Every thing is going perfect, I get a word randomly from DB show it as a label apply it a class where display = none. Now when I click on a Character that character become disable fine which i actually want but the label-character does not show. My code is: <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <?php include( 'config.php' ); $question = questions(); // Get question. $alpha = alphabats(); // Get alphabets. ?> <script language="javascript"> function clickMe( name ){ var question = '<?php echo $question; ?>'; var questionLen = <?php echo strlen($question); ?>; for ( var i = 0; i < questionLen; i++ ){ if ( question[i] == name ){ var link = document.getElementById( name ); link.style.display = 'none'; var label = document.getElementById( 'questionLabel' + i ); label.style.display = 'block'; } } } </script> <div> <table align="center" style="border:solid 1px"> <tr> <?php for ( $i = 0; $i < 26; $i++ ) { echo "<td><a href='#' id=$alpha[$i] name=$alpha[$i] onclick=clickMe('$alpha[$i]');>". $alpha[$i] ."</a>&nbsp;</td>"; } ?> </tr> </table> <br/> <table align="center" style="border:solid 1px"> <tr> <?php for ( $i = 0; $i < strlen($question); $i++ ) { echo "<td class='question'><label id=questionLabel$i >". $question[$i] ."</label></td>"; } ?> </tr> </table> </div>

    Read the article

  • How to dynamic call property on javascript object with jQuery

    - by Massimo Ugues
    Hallo all. I got a javascript object with some propeties let's say function Animal() { this.id; this.name; I need to call id function in a dynamic way to get and set its value: something like this Animal animal = new Animal(); var propertyName = "id"; animal.+propertyName = "name"; Is there an elegant way to do it? With jQuery? Kind regards Massimo

    Read the article

  • Javascript: detect when a window is resized ?

    - by Patrick
    Is there any way with jQuery or javascript to trigger a function when the user ends to resize the browser window ? In other terms: 1) Can I detect mouse up event when user is resizing the browser window ? otherwise 2) Can I detect when a window resize operation is finished ? I'm currently only able to trigger an event when the user start to resize the window with jquery thanks

    Read the article

  • How to get element from javascript in JSF 2.0

    - by amorfis
    I have JSF code like: <h:inputText id="from" value="#{fromToMBean.fromName}"/> I would like to get this element from JavaScript by ID (from), but I can't, because in generated HTML it is j_idt8:from How can I get this element in e.g. jQuery? Is there any way to force JSF2 not to change ids?

    Read the article

  • A feature rich JavaScript IDE environment?

    - by jdk
    I'm currently using Visual Studio 2008 to edit .js files with, and it has decent support but I want more... I like the VS syntax highlighting and auto-indentation features but additionally would like advanced features like: contextual info and help, collapsible JavaScript blocks, implicit symbol understanding for searching, refactoring and that kind of thing; also warnings and errors for the js code. Suggestions?

    Read the article

  • how to save xml files using Javascript?

    - by user311884
    Dear friends, I tried to 1) load an xml file using javascript as an object, say "note.xml" 2) then save the object to a new xml file, say "note_new.xml" I did 1) but failed 2) I tried to use method save() to do 2). After my failure, I checked ms site and they said save() is not supported.... could some one enlighten me how to do the save? thank you! here is the code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <h1>W3Schools Internal Note</h1> <p><b>To:</b> <span id="to"></span><br /> <b>From:</b> <span id="from"></span><br /> <b>Message:</b> <span id="message"></span> <script type="text/javascript"> if (window.ActiveXObject){ alert("there is ActiveXObject"); var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async=false; xmlDoc.load("note.xml"); }else{ alert("i am not withActiveXObject!"); xhttp=new XMLHttpRequest(); xhttp.open("GET","note.xml",false); xhttp.send(""); xmlDoc=xhttp.responseXML; } xmlDoc.save("note_new.xml"); </script> </body> </html> update: seems this is related to security issue. I appologize to those experienced programmers for my putting this question in a rush because it seems a newbie question.

    Read the article

  • javascript associative array length using jquery

    - by Prashant
    Hello All I am using javascript associative array like: var testarray = []; testarray['one'] = '1'; testarray['two'] = '2'; testarray['three'] = '3'; I am also using jquery alongside. How can I check length of this associative array using jquery or any other method? Basically i want to check whether this array is empty or not. Thank you.

    Read the article

  • JavaScript: How to get the instance name of an object

    - by Quandary
    I use the below code to write code to query a web method in a specified interval. now in the this.Poll function I have to do this.tmo = setTimeout(this.strInstanceName + ".Poll()", this.iInterval); instead of this.tmo = setTimeout(this.Poll(), this.iInterval); because IE looses the this object after setTimeout So I have to pass the class it's instance name: var objPoll = new cPoll("objPoll"); How can I get the instance name without passing it as parameter ? I want to have it outta there ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Intervall-Test</title> <script type="text/javascript" language="javascript"> function test() { alert("Test"); test.tmo = setTimeout(test, 2000); test.Clear = function() { clearTimeout(test.tmo); } } function cPoll(strInstanceName) { this.strInstanceName = strInstanceName ; this.iInterval = 2000; this.tmo=null; this.cbFunction=null; alert(this.Name ); this.Poll = function() { this.cbFunction(); this.tmo = setTimeout(this.strInstanceName + ".Poll()", this.iInterval); } this.Start = function(pCallBackFunction, iIntervalParameter) { if(this.tmo != null) this.Stop(); if(iIntervalParameter && iIntervalParameter > 0) this.iInterval=iIntervalParameter; this.cbFunction=pCallBackFunction; if(this.cbFunction!=null) this.Poll(); else alert("Invalid or no callback function specified"); } this.Stop = function() { if(this.tmo != null) { clearTimeout(this.tmo); this.tmo=null; } } } function CallBackFunction() { alert("PollCallBack"); } // test(); // test.Clear(); var objPoll = new cPoll("objPoll"); </script> </head> <body> <h1>Test</h1> <input type="Button" value="Start polling" onclick="objPoll.Start(CallBackFunction,3000);" /> <input type="Button" value="Stop polling" onclick="objPoll.Stop();" /> </body> </html>

    Read the article

  • How to load photoshop action with JavaScript?

    - by Elena
    Hello! How do I load photoshop's action using its javascript scripting language? Mostly curious in this action steps: Add Noise Distribution: gaussian Percent: 2% With Monochromatic Texturizer Texture Type: Canvas Scaling: 100 Relief: 3 Without Invert Texture Light Direction: Top Left

    Read the article

  • javascript parse parenthesis

    - by Paul
    I need parse a string inside a parenthesis, which looks like (A, B, C), where A, B, and C are string that can contain any legal JavaScript code. For example, B might be a very long string with nested structures similar to (A, B, C). What would be the best way to parse such a string?

    Read the article

  • javascript uml diagrammer

    - by bob
    Hi, Does anyone know of a javascript UML diagrammer? I have found the Eclipse plugin jsuml from jsuml.org, however the plugin crashes when I try to generate a diagram. Thanks, Bob

    Read the article

  • Web crawler that can interpret javascript

    - by user320662
    Hi, I want to write a web crawler that can interpret JavaScript. Basically its a program in Java or PHP that takes a URL as input and outputs the DOM tree which is similar to the output in Firebug HTML window. The best example is Kayak.com where you can not see the resulting DOM displayed on the browser when you 'view source' but can save the resulting HTML though firebug.

    Read the article

  • insert c# code inside javascript

    - by niao
    Greetings, how can I inject c# code (my Model property) inside javascript? I want to do something like this: $(".star<%=Model.ROWGUID %>").mouseover(function() { var span = $(this).parent("span"); var newRating = $(this).attr("value"); setRating(span, newRating); });

    Read the article

  • Decimal in javascript

    - by karthi
    The text box should accept onli decimal values in javascript. Not any other special characters. It should not accept "." more than once. For ex. it should not accept 6.....12 Can anybody help???

    Read the article

  • Javascript error after updating ASP.NET AJAX ControlToolkit

    - by empo
    I've just updated to the AJAX Control Toolkit 3.5, changed the ScriptManager to the ToolkitScriptManager in my master page and now the following javascript error occurs when an Edit button is clicked: "Object doesn't support this property or method" The line of code cuasing the error is: this._destroyTree(updatePanelElement); Any initial ideas before I post masses of code?

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >