Search Results

Search found 251 results on 11 pages for 'jscript'.

Page 3/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Loading Jscript files into Firefox extension

    - by colon3l
    Hi ! Let's get directly to the problem : I'm actually doing a firefox extension in which i would like to implement the jWebsocket API in order to build a small chat. I got my main script file, named test.js, and the jWebsocket lib into a js folder. Just for you to know, this is my first firefox extension ever. So in my XUL file I got this (for the script part only of course, the interface code is not shown) : <overlay id="test-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="chrome://test/content/test.js" /> <script type="application/x-javascript" src="chrome://test/content/js/jwebsocket.js" /> jwebsocket.js being the file I need to call according to jWebsocket website. In my main script file test.js I start with : if (jws.browserSupportsWebSockets()) { jWebSocketClient = new jws.jWebSocketJSONClient(); } else { var lMsg = jws.MSG_WS_NOT_SUPPORTED; alert(lMsg); } jws being the namespace created into the jwebsocket.js file. Of course I've got the required stand-alone server running in background, and working. So from what I understood looking on various websites, is that if a js file is loaded into the javascript allocated memory space (with the tag), all namespace/function should be available between each file. But this was mostly for HTML-oriented issues, so I'm not sure if it applies to XUL/Firefox environment. But the script keep failing at the first jws call. Any ideas on what goes wrong here ? I'm stuck for 2 days now :/

    Read the article

  • Runtime JScript error: object expected.

    - by Masha
    Help! As soon as enable script debugging I get this error. It breaks on the following block: <table> <tr> <td style="width: 100px"> <asp:TextBox ID="txtRun" runat="server" OnTextChanged="txtRun_TextChanged"></asp:TextBox> </td> <td style="width: 100px"> <asp:Button ID="btnFilter" runat="server" Text="Show Elements" OnClick="btnFilter_Click" /> </td> </tr> </table> The cursor jumps to the last tag. I am lost. Thank you in advance.

    Read the article

  • Visual Studio Packaging: Another version of this product is already installed

    - by Sam
    Hi All, I have a msi created for a project which uses C# & Jscript. version-1.0 is currently public. I want to release a bug-fixed version v-1.0.1 of this package but while testing it, I am getting "Another version of this product is already installed Installation of this version cannot continue.To configure or remove the existing version of this product, use Add/Remove program on the Control Panel". I want this bug-fixed version to install silently without asking user to uninstall and install new one. Please help me how can I achieve this, I am using visual studio 2008. Thanks in Advance! Sam

    Read the article

  • How do you read data from a ADODB stream in ASP as byte values?

    - by user89691
    I have an ASP routine that gets a binary file's contents and writes it to a stream. The intention is to read it from the stream and process it st the server. So I have: ResponseBody = SomeRequest (SomeURL) ; var BinaryInputStream = Server.CreateObject ("ADODB.Stream") ; BinaryInputStream.Type = 1 ; // binary BinaryInputStream.Open ; BinaryInputStream.Write (ResponseBody) ; BinaryInputStream.Position = 0 ; var DataByte = BinaryInputStream.Read (1) ; Response.Write (typeof (DataByte)) ; // displays "unknown" How do I get the byte value of the byte I have just read from the stream? Asc () and byte () don't work (JScript) TIA

    Read the article

  • How to gray out HTML form inputs?

    - by typoknig
    What is the best way to gray out text inputs on an HTML form? I need the inputs to be grayed out when a user checks a check box. Do I have to use JavaScript for this (not very familiar with JScript) or can I use PHP (which I am more familiar with)? EDIT: After some reading I have got a little bit of code, but it is giving me problems. For some reason I cannot get my script to work based on the state of the form input (enabled or disabled) or the state of my checkbox (checked or unchecked), but my script works fine when I base it on the values of the form inputs. I have written my code exactly like several examples online (mainly this one) but to no avail. None of the stuff that is commented out will work. What am I doing wrong here? <label>Mailing address same as residental address</label> <input name="checkbox" onclick="disable_enable() "type="checkbox" style="width:15px"/><br/><br/> <script type="text/javascript"> function disable_enable(){ if (document.form.mail_street_address.value==1) document.form.mail_street_address.value=0; //document.form.mail_street_address.disabled=true; //document.form.mail_city.disabled=true; //document.form.mail_state.disabled=true; //document.form.mail_zip.disabled=true; else document.form.mail_street_address.value=1; //document.form.mail_street.disabled=false; //document.form.mail_city.disabled=false; //document.form.mail_state.disabled=false; //document.form.mail_zip.disabled=false; } </script>

    Read the article

  • Combining JSON Arrays

    - by George
    I have 3 json arrays, each with information listed in the same format: Array: ID: NAME: DATA: ID: NAME: DATA: etc... My goal is to combine all 3 arrays into one array, and sort and display by NAME by passing the 3 arrays into a function. The function I've tried is: JSCRIPT Call: // to save time I'm just passing the name of the array, I've tried passing // the full array name as json[0]['DATA'][array_1][0]['NAME'] as well. combineNames(['array_1','array_2']); FUNCTION: function combineNames(names) { var allNames = [] for (i=0;i<names.length;i++) { for (j=0;j<json[0]['DATA'][names[i]].length;j++) { allNames.push(json[0]['DATA'][names[i]][j]['NAME']); } } return allNames.sort(); } The above gives me the error that NAME is null or undefined. I've also tried using the array.concat function which works when I hard code it: var names = []; var allNames = []; var names = names.concat(json[0]['DATA']['array_1'],json[0]['DATA']['array_2']); for (i=0;i<names.length;i++) { allNames.push(names[i]['NAME']); } return allNames.sort(); But I can't figure out how to pass in the arrays into the function (and if possible I would like to just pass in the array name part instead of the whole json[0]['DATA']['array_name'] like I was trying to do in the first function...

    Read the article

  • jquery function call with parameters

    - by Kaushik Gopal
    Hi a newb question: I have a table with a bunch of buttons like so: <tr class="hr-table-cell" > <td>REcord 1</td> <td> <INPUT type="button" value="Approve" onclick="" /> <INPUT type="button" value="Reject" onclick="" /> <INPUT type="button" value="Delete" onclick="fnDeletePpAppl(222445,704);" /> </td> </tr> <tr class="hr-table-cell" > <td>REcord 1</td> <td align="center" class="hr-table-bottom-blue-border" valign="middle"> <INPUT type="button" value="Approve" onclick="" /> <INPUT type="button" value="Reject" onclick="" /> <INPUT type="button" value="Delete" onclick="fnDeletePpAppl(237760,776);" /> </td> </tr> I have my jquery like so: <script type="text/javascript"> // JQUERY stuff $(document).ready(function(){ function fnDeletePpAppl(empno, applno) { alert('Entering here'); $("form").get(0).empno.value = empno; $("form").get(0).applNo.value = applno; $("form").get(0).listPageAction.value = "delete"; $("form").get(0).action.value = "pprelreqlist.do"; $("form").get(0).submit(); } }); This doesn't seem to work.I thought this means, the function is ready only after the dom is ready. After the dom is ready and i click the button, why is not recognizing the function declaration within the .ready() function? However if i use the function directly: <script type="text/javascript"> function fnDeletePpAppl(empno, applno) { alert('Entering here'); $("form").get(0).empno.value = empno; $("form").get(0).applNo.value = applno; $("form").get(0).listPageAction.value = "delete"; $("form").get(0).action.value = "pprelreqlist.do"; $("form").get(0).submit(); } This works. I want to get my fundamentals straight here... If i do the declaration without the .ready() , does that mean i'm using plain vanilla jscript? If i were to do this with the document.ready - the usual jquery declaration way, what would i have to change to make it work? I understand there are much better ways to do this like binding with buttons etc, but I want to know why this particular way doesn't seem to be working. Thanks. Cheers. K

    Read the article

  • Multiple value array

    - by Ant..
    I am new to jScript and have written this code [which works perfectly]. Its purpose is to test that the term for the amount of loan is not exceeded. Can the process be consolidated into one array where you pass the loan amount which returns the term based on the range i.e. 6000 to 7000 = 96 function TestMaxTerm() { var LnAmt = 14000 //Testing Purposes var Term = 0 //Testing Purposes if (LnAmt > 0 && LnAmt <= 1000){Term = 0;} if (LnAmt > 1000 && LnAmt <= 2000){Term = 1;} if (LnAmt > 2000 && LnAmt <= 3000){Term = 2;} if (LnAmt > 3000 && LnAmt <= 4000){Term = 3;} if (LnAmt > 4000 && LnAmt <= 5000){Term = 4;} if (LnAmt > 5000 && LnAmt <= 6000){Term = 5;} if (LnAmt > 6000 && LnAmt <= 7000){Term = 6;} if (LnAmt > 7000 && LnAmt <= 8000){Term = 7;} if (LnAmt > 8000 && LnAmt <= 9000){Term = 8;} if (LnAmt > 9000 && LnAmt <= 10000){Term = 9;} if (LnAmt > 10000 && LnAmt <= 11000){Term = 10;} if (LnAmt > 11000 && LnAmt <= 12000){Term = 11;} if (LnAmt > 11000){Term = 12;} //Obtain Maximum Term for Loan Amount var MaxTerm = new Array(); MaxTerm[0] = 24; MaxTerm[1]=36; MaxTerm[2] = 48; MaxTerm[3] = 60; MaxTerm[5] = 72; MaxTerm[5]=84; MaxTerm[6] = 96; MaxTerm[7] = 108; MaxTerm[8] = 120; MaxTerm[9]=132; MaxTerm[10] = 164; MaxTerm[11] = 176; MaxTerm[12] = 420; var text = MaxTerm[Term]; alert(text); }

    Read the article

  • Cannot use 'javascript' because another language has been specified earlier in this page (or was implied from a CodeFile attribute).

    - by klm9971
    Hello: I have a website in which I am including a javascript file from this link: Code Snippet Page I am getting this error: Microsoft JScript runtime error: Object expected Here is my code: <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ATP_Assignment.Default" %> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="topArea" runat="server"> <div> <div id="matchUp" class="floatLeft"> <div class="tabTop"> <div class="tabTL"></div> <div class="tabTM"> <font class="title">Player Matchup History</font> </div> <div class="tabTR"></div> </div> <div class="tabMiddle"> <asp:DropDownList ID="ddlPlayer1" runat="server" Height="16px" Width="146px" DataTextField="Name" DataValueField="Id"> </asp:DropDownList> &nbsp;&nbsp;VS&nbsp;&nbsp; <asp:DropDownList ID="ddlPlayer2" runat="server" Height="16px" Width="150px" DataTextField="Name" DataValueField="ID"> </asp:DropDownList> <asp:Button ID="Button1" runat="server" Text="Click" onclick="Button1_Click" /> <br /> Player1: <asp:Label ID="lblPlayer1Score" Value="" runat="server"></asp:Label>&nbsp;&nbsp; Player2: <asp:Label ID="lblPlayer2Score" Value="" runat="server"></asp:Label> </div> <div class="tabBottom"> <div class="tabBL"></div> <div class="tabBM"></div> <div class="tabBR"></div> </div> </div> <div id="favList" class="floatLeft"> <div class="tabTop2"> <div class="tabTL"></div> <div class="tabTM2"> <font class="title">Favorite Player List</font> </div> <div class="tabTR"></div> </div> <div class="tabMiddle2"> Enter Fav JQuery Here!!! </div> <div class="tabBottom2"> <div class="tabBL"></div> <div class="tabBM2"></div> <div class="tabBR"></div> </div> </div> <div class="clearFix">&nbsp;</div> </div> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="contentArea" runat="server"> <div class="padding"> <div> <div id="playerList" class="floatLeft"> <font class="title">Player List</font> <br /> <asp:DataList ID="PlayerList" runat="server"> <ItemTemplate> Name: <asp:Label ID="lblFirstName" runat="server" Text='<%# Eval("FirstName") %>' /> &nbsp; <asp:Label ID="lblLastName" runat="server" Text='<%# Eval("LastName") %>' /> <br /> Rank: <asp:Label ID="lblRank" runat="server" Text='<%# Eval("Rank") %>' /> <br /> Country: <asp:Label ID="lblCountry" runat="server" Text='<%# Eval("Country") %>' /> <br /> <br /> </ItemTemplate> </asp:DataList> </div> <div class="smallPadding">&nbsp;</div> <div id="video"> </div> <div class="clearFix">&nbsp;</div> </div> <div id="tweet"> <font class="title">Recent Tweets</font> <br /> <script type="text/javascript"> alert($ && $.fn ? $.fn.jquery : "jQuery not defined") $(function () { $("#favorites").tweet({ avatar_size: 32, count: 3, username: "atpworldtour", favorites: true, loading_text: "loading list..." }); }); </script> </div> </div> </asp:Content> Where should I put this code: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>

    Read the article

  • What language is used in Google Desktop gadgets?

    - by Claudiu
    The language Google Desktop gadgets use resembles JavaScript, but it's different in subtle ways. For example, I saw this line in a gadget: options(HISTORY_OPTIONS_NAME) = items_.join("|"); which looks like it's assigning to a function call. That's just not OK in JavaScript... what language is this? And what exactly is that line doing?

    Read the article

  • firebug saying not a function

    - by Aaron
    <script type = "text/javascript"> var First_Array = new Array(); function reset_Form2() {document.extraInfo.reset();} function showList1() {document.getElementById("favSports").style.visibility="visible";} function showList2() {document.getElementById("favSubjects").style.visibility="visible";} function hideProceed() {document.getElementById('proceed').style.visibility='hidden';} function proceedToSecond () { document.getElementById("div1").style.visibility="hidden"; document.getElementById("div2").style.visibility="visible"; document.getElementById("favSports").style.visibility="hidden"; document.getElementById("favSubjects").style.visibility="hidden"; } function backToFirst () { document.getElementById("div1").style.visibility="visible"; document.getElementById("div2").style.visibility="hidden"; document.getElementById("favSports").style.visibility="visible"; document.getElementById("favSubjects").style.visibility="visible"; } function reset_Form(){ document.personalInfo.reset(); document.getElementById("favSports").style.visibility="hidden"; document.getElementById("favSubjects").style.visibility="hidden"; } function isValidName(firstStr) { var firstPat = /^([a-zA-Z]+)$/; var matchArray = firstStr.match(firstPat); if (matchArray == null) { alert("That's a weird name, try again"); return false; } return true; } function isValidZip(zipStr) { var zipPat =/[0-9]{5}/; var matchArray = zipStr.match(zipPat); if(matchArray == null) { alert("Zip is not in valid format"); return false; } return true; } function isValidApt(aptStr) { var aptPat = /[\d]/; var matchArray = aptStr.match(aptPat); if(matchArray == null) { if (aptStr=="") { return true; } alert("Apt is not proper format"); return false; } return true; } function isValidDate(dateStr) { //requires 4 digit year: var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/; var matchArray = dateStr.match(datePat); if (matchArray == null) { alert("Date is not in a valid format."); return false; } return true; } function checkRadioFirst() { var rb = document.personalInfo.salutation; for(var i=0;i<rb.length;i++) { if(rb[i].checked) { return true; } } alert("Please specify a salutation"); return false; } function checkCheckFirst() { var rb = document.personalInfo.operatingSystems; for(var i=0;i<rb.length;i++) { if(rb[i].checked) { return true; } } alert("Please specify an operating system") ; return false; } function checkSelectFirst() { if ( document.personalInfo.sports.selectedIndex == -1) { alert ( "Please select a sport" ); return false; } return true; } function checkRadioSecond() { var rb = document.extraInfo.referral; for(var i=0;i<rb.length;i++) { if(rb[i].checked) { return true; } } alert("Please select form of referral"); return false; } function checkCheckSecond() { var rb = document.extraInfo.officeSupplies; for(var i=0;i<rb.length;i++) { if(rb[i].checked) { return true; } } alert("Please select an office supply option"); return false; } function checkSelectSecond() { if ( document.extraInfo.colorPick.selectedIndex == 0 ) { alert ( "Please select a favorite color" ); return false; } return true; } function check_Form(){ var retvalue = isValidDate(document.personalInfo.date.value); if(retvalue) { retvalue = isValidZip(document.personalInfo.zipCode.value); if(retvalue) { retvalue = isValidName(document.personalInfo.nameFirst.value); if(retvalue) { retvalue = checkRadioFirst(); if(retvalue) { retvalue = checkCheckFirst(); if(retvalue) { retvalue = checkSelectFirst(); if(retvalue) { retvalue = isValidApt(document.personalInfo.aptNum.value); if(retvalue){ document.getElementById('proceed').style.visibility='visible'; var rb = document.personalInfo.salutation; for(var i=0;i<rb.length;i++) { if(rb[i].checked) { var salForm = rb[i].value; } } var SportsOptions = ""; for(var j=0;j<document.personalInfo.sports.length;j++){ if ( document.personalInfo.sports.options[j].selected){ SportsOptions += document.personalInfo.sports.options[j].value + " "; } } var SubjectsOptions= ""; for(var k=0;k<document.personalInfo.subjects.length;k++){ if ( document.personalInfo.subjects.options[k].selected){ SubjectsOptions += document.personalInfo.subjects.options[k].value + " "; } } var osBox = document.personalInfo.operatingSystems; var OSOptions = ""; for(var y=0;y<osBox.length;y++) { if(osBox[y].checked) { OSOptions += osBox[y].value + " "; } } First_Array[0] = salForm; First_Array[1] = document.personalInfo.nameFirst.value; First_Array[2] = document.personalInfo.nameMiddle.value; First_Array[3] = document.personalInfo.nameLast.value; First_Array[4] = document.personalInfo.address.value; First_Array[5] = document.personalInfo.aptNum.value; First_Array[6] = document.personalInfo.city.value; for(var l=0; l<document.personalInfo.state.length; l++) { if (document.personalInfo.state.options[l].selected) { First_Array[7] = document.personalInfo.state[l].value; } } First_Array[8] = document.personalInfo.zipCode.value; First_Array[9] = document.personalInfo.date.value; First_Array[10] = document.personalInfo.phone.value; First_Array[11] = SportsOptions; First_Array[12] = SubjectsOptions; First_Array[13] = OSOptions; alert("Everything looks good."); document.getElementById('validityButton').style.visibility='hidden'; } } } } } } } } /*function formAction2() { var retvalue; retvalue = checkRadioSecond(); if(!retvalue) { return retvalue; } retvalue = checkCheckSecond(); if(!retvalue) { return retvalue; } return checkSelectSecond() ; } */ </script> This is just a sample of the code, there are alot more functions, but I thought the error might be related to surrounding code. I have absolutely no idea why, as I know all the surrounding functions execute, and First_Array is populated. However when I click the Proceed to Second button, the onclick attribute does not execute because Firebug says proceedToSecond is not a function button code: <input type="button" id="proceed" name="proceedToSecond" onclick="proceedToSecond();" value="Proceed to second form">

    Read the article

  • Looping through JSON arrays

    - by George
    I'm trying to pull the field names in the header of some JSON output. The following is a sample of the JSON header info: {"HEADER":{"company":{"label":"Company Name"},"streetaddress":{"label":"Street Address"},"ceo":{"label":"CEO Name","fields":{"firstname":{"label":"First Name"},"lastname":{"label":"Last Name"}}} I'm able to loop through the header and output the field and label (i.e. company and Company Name) using the following code: obj = JSON.parse(jsonResponse); for (var key in obj.HEADER) { response.write ( obj.HEADER[key].label ); response.write ( key ); } but can't figure out how to loop through and output the sub array of fields (i.e. firstname and First Name). Any ideas?

    Read the article

  • ActiveX: Could not load Driver

    - by Abs
    Hello all, I am having a look at this example which makes use of activeX - it does extacly what I need from the description but everytime I try to run the example, I get the error: Could not load Drivers. The ActiveX Control could not be started. I have tried this on IE8 on a windows Vista Machine. What is the problem, how can I get those drivers? This is my first time with ActiveX. Thanks all for any help

    Read the article

  • Which event handler to use to record leaving page - onunload or onbeforeunload?

    - by symcbean
    Hi all, Having not any answers to my previous questions about using javascript to measure page turn times, I'm going to start writing my own code (!). To measure the length of tie it takes, I'm proposing dropping a cookie containing a timestamp when the user browses away from a page, then in a subsequent page, comparing that time with 'now' and sending back a request to a URL which will log the interval. It seems that there are 2 possible handlers I could associate the first block of code with - the onunload() handler or the onbeforeunload()? It's more important that it fail silently on browsers with no/broken support for the handler, than it be portable across every possible browser. Any pointers? Gotchas? TIA C.

    Read the article

  • Javascript, IE, Strings, and Performance problems

    - by Infinity
    Hey guys, So we have this product, and it's really slow in IE. We've already applied a lot of the practices advised by the IE guys themselves (like this, and this), and try to sacrifice clean code for performance in the critical parts like DOM manipulation. However, as you can see in this IE profiler screenshot.. Just "String" is the biggest offender. Almost 750ms of exclusive time. Does this mean IE is spending 750ms just instantiating Strings? I also read this stuff on the Opera dev blog: A build script can remove whitespace, comments, replace strings with Array lookups (to avoid MSIE creating a string object for every single instance of a string — even in conditions) But no more info regarding this. Anyone can clarify? It seems like IE has to create a full String instance every time you have " " in your code, which could explain this, but I don't know what the array lookup optimization would look like. BTW- we don't really do much of string concatenation anywhere in the code. The library we use is MooTools 1.2.4 Any suggestions will be appreciated! Thx

    Read the article

  • how to keep the value of a variable in a closure

    - by Florian Fida
    i need to create multiple javascript functions which have a static id inside, so the function itself knows what data to process. Here is some code: (function(){ function log(s){ if(console && console.log) console.log(s); else alert(s); } var i = 10; while (i--){ window.setTimeout(function(){ // i need i to be 10, 9, 8... here not -1 log(i); },500); } })(); The problem ist that i allways gets updated by the loop, and i need to prevent this. Thanks in advance for any help, comments or tips!

    Read the article

  • Getting geographical coordinates from web application

    - by user51151
    I want to learn a user's location from his mobile device by web application. When user opens the website, with the help of a script we will learn if the device has a gps hardware.And if the device has gps hardware what are the current coordinates? I'm developing my project using ASP.NET Is this possible or not? Thanks.

    Read the article

  • contain new elements of an "instance" in javascript

    - by iamnotmad
    Hi, so I know there are tons of ways to simulate inheritance and other OO features. I have chosen one to use for my project and am wondering if I can create an instance and add stuff to it and keep it contained (within braces). Consider the following: function BaseClass(){ <this.stuff here> } function SubClass(){ this.superClass = BaseClass(); this.superClass(); <this.other stuff here> } myObj = new SubClass(); so myObj is an instance of SubClass. I can add things to myObj like: myObj.blah = "funtimes"; What I would like is to be able to add stuff to the "instance" and keep it organized in braces much like the constructor. psuedo code like: myObj = new SubClass() { var blah = "funtimes" <more instance specific stuff here> } Is something like this possible? Thanks!

    Read the article

  • Trouble defining method for Javascript class definition.

    - by btoverdrive
    I'm somewhat new to object oriented programming in Javascript and I'm trying to build a handler object and library for a list of items I get back from an API call. Ideally, I'd like the library functions to be members of the handler class. I'm having trouble getting my class method to work however. I defined as part of the class bcObject the method getModifiedDateTime, but when I try to echo the result of the objects call to this method, I get this error: Error on line 44 position 26: Expected ';' this.getModifiedDateTime: function(epochtime) { which leads me to believe that I simply have a syntax issue with my method definition but I can't figure out where. response( { "items": [ {"id":711,"name":"Shuttle","lastModifiedDate":"1268426336727"}, {"id":754,"name":"Formula1","lastModifiedDate":"1270121717721"} ], "extraListItemsAttr1":"blah", "extraListItemsAttr2":"blah2" }); function response(MyObject) { bcObject = new bcObject(MyObject); thing = bcObject.getModifiedDateTime(bcObject.videoItem[0].lastModifiedDate); SOSE.Echo(thing); } function bcObject(listObject) { // define class members this.responseList = {}; this.videoCount = 0; this.videoItem = []; this.responseListError = ""; // instantiate members this.responseList = listObject; this.videoCount = listObject.items.length; // populate videoItem array for (i=0;i<this.videoCount;i++) { this.videoItem[i] = listObject.items[i]; } this.getModifiedDateTime: function(epochtime) { var dateStringOutput = ""; var myDate = new Date(epochtime); dateStringOutput = myDate.toLocaleString(); return dateStringOutput; }; }

    Read the article

  • ADO Execute not reading a line of SQL code?

    - by llaskin
    My code is below: var statement = "test_oracle.sql"; F = aqFile.OpenTextFile(statement, aqFile.faRead, aqFile.ctANSI); F.Cursor = 0; while(! F.IsEndOfFile()){ s = F.ReadLine(); oResult = Project.Variables.oConnection.Execute_(s); CheckResult(oResult, "Unable to run SQL script to add documents"); The first line that "s" reads is: set serverout on size 10000 An error is returned as "ORA-00922: missing or invalid option" Can anyone provide guidance?

    Read the article

  • [AJAX Numeric Updown Control] Microsoft JScript runtime error: The number of fractional digits is out of range

    - by Jenson
    If you have using Ajax control toolkits a lot (which I will skip the parts on where to download and how to configure it in Visual Studio 2010), you might have encountered some bugs or limitations of the controls, or rather, some weird behaviours. I would call them weird behaviours though. Recently, I've been working on a Ajax numeric updown control, which i remember clearly it was working fine without problems. In fact, I use 2 numeric updown control this time. So I went on to configure it to be as simple as possible and I will just use the default up and down buttons provided by it (so that I won't need to design my own). I have two textbox controls to display the value controlled by the updown control. One for month, and another for year. <asp:TextBox ID="txtMonth" runat="server" CssClass="txtNumeric" ReadOnly="True" Width="150px" /> <asp:TextBox ID="txtYear" runat="server" CssClass="txtNumeric" ReadOnly="True" Width="150px" /> So I will now drop 1 numeric updown control for each of the textboxes. <asp:NumericUpDownExtender ID="txtMonth_NumericUpDownExtender"     runat="server" TargetControlID="txtMonth" Maximum="12" Minimum="1" Width="152"> </asp:NumericUpDownExtender>                          <asp:NumericUpDownExtender ID="txtYear_NumericUpDownExtender"     runat="server" TargetControlID="txtYear" Width="152"> </asp:NumericUpDownExtender>                                                  You noticed that I configure the Maximum and Minimum value for the first numericupdown control, but I never did the same for the second one (for txtYear). That's because it won't work, well, at least for me. So I remove the Minimum="2000" and Maximum="2099" from there. Then I would configure the initial value to the the current year, and let the year to flow up and down freely. If you want, you want write the codes to restrict it. Here are the codes I used on PageLoad:     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load         If Not Page.IsPostBack Then             If Trim(txtMonth.Text) = "" Then                 Me.txtMonth.Text = System.DateTime.Today.Month             End If             If Trim(txtYear.Text) = "" Then                 Me.txtYear.Text = System.DateTime.Today.Year             End If         End If     End Sub   Enjoy!

    Read the article

  • create a YYYY-MM-DD Daterange in JScript/Javascript.

    - by Marcus
    Hello. I need no generate a full daterange in JScript from a given Startdate to now. Startdate: 2010-03-25 2010-03-26 2010-03-27 ... 2010-05-30 I am very confused with Javascript Date. best would be a function to give a daterange as params and getting an Array of the formatted date back, something like that: range[0] = 2010-03-25 range[1] = 2010-03-26 range[2] = 2010-03-27 ... range[x] = 2010-05-30 I am so confused thanks for any hint marcus

    Read the article

  • Passing page control from jscript to pagemethod in the codebehind?

    - by brandonprry
    Hi, I am looking write a javascript method as such called when a dropdownlist changes value function GetStuff(sender, destID){ var dest = document.getElementById(destID); this.PageMethods.GetStuffs(sender, dest, null, null); } GetStuffs() is in the Codebehind as follows: [WebMethod] public static void GetStuffs(object sender, object dest) { DropDownList s = sender as DropDownList; DropDownList d = dest as DropDownList; d.Items.Add(new ListItem(s.SelectedValue)); } I have a break point set at the method and alerts in the GetStuff() jscript method fire up until the PageMethod call, at which nothing happens. I have set OnSuccess and OnFailure methods up with alerts and they don't get fired. Any thoughts? Am I doing something inherently wrong?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >