Vote count: 0 Have an interesting issue when trying to save some input fields when a user clicks on the Save button. If a user clicks the save button as the next action after typing data the onblur action intercepts the onclick and does not trigger the save. However, if you add some padding (30px) and click above the word save it works but below the word Save it does not work, the same as with no padding. I'm certain users will go right from typing text in the input field then click Save which will fail unless they first click somewhere else and then click Save. I’ve provide html and javascript example below. Is there a way using javascript to solve this issue? function showstreet() { var x ...
ادامه مطلبVote count: 0 I've looked at about 30 different questions, and each one deals with "getelementbyID". My issue is the element I need to scrape doesn't have an id: I see it is inside of an "h6" class or tag, but msgbox IEObj.Document.getelementsbytagname("h6").Value msgbox IEObj.Document.getelementsbyclassname("h6").Value just retus the "Object doesn't support this property or method". What am I doing wrong?? (The rest of the code just sets up a IE Object called IEObj, and navigates to this page, so it's unimportant). asked 3 mins agoC-Love511 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Is it possible to convert a pdf file to a docx/doc file in javascript client side only? I have not found any way to do it in javascript so far. asked 51 secs agoAK0101 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am reading through the Elm guide and their JavaScript interOp. Here is a simplified version: port module FooBar exposing (..) import Html exposing (..) import Html.Attributes exposing (..) import Html.App as Html import String main = Html.program { init = init , view = view , update = update , subscriptions = subscriptions } -- subscriptions port f : () -> Cmd msg port g : ( Int -> msg ) -> Sub msg subscriptions: Model -> Sub Msg subscriptions model = g Get -- MODEL type alias Model = { pt : Int } -- VIEW view: Model -> Html Msg view model = Html.text ( toString model.pt ) -- UPDATE type Msg = Ask | Get Int update: Msg -> Model -> (Model, Cmd msg) update msg model = case msg ...
ادامه مطلبVote count: 0 Program: ... Section 1 .... Section 2 .... Section 3 .... var acc = document.getElementsByClassName("accordion"); var i; for (i = 0; i < acc.length; i++) { acc[i].onclick = function(){ this.classList.toggle("active"); this.nextElementSibling.classList.toggle("show"); } } ... I am a newbie to javascript. So, I am not able to understand the above javascript code. I expect "this" keyword refers to window object. Because, it is called within anonymous function and also there is no object for that function. But, it refers to the object "HTMLButtonElement". How "this" refers to Button object ? asked 8 mins agomrg 3 Answers Vote count: 1 How "this" refers to Button object ? Every func...
ادامه مطلبVote count: -7 I need to know which library is used in this site, a friend of me say that it's custom one, what do you think? http://www.windowsoftware.co.uk/windowcadweb/ edited 34 secs agoAdriano Repetti asked 2 mins agorammah Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm creating an S3 constructor/object/script. I have a list in my script that needs to be printed like: ID: 9876 Name: Virgil Gender: M LDL: 248* HDL: 45+ Triglycerides: 148 I defined a print function earlier. print.ChlorReads...
ادامه مطلبVote count: 0 In my javascript $(document).ready(function() { console.log((new Date().getTime() / 1000)); if ((new Date(setting.lastDate).getTime() / 1000)...
ادامه مطلبVote count: 0 I have something like this: var MyModule = function() { // some private var var myVar1, myVar2; // some private function var _myPrivateFunc = function() { //something } // public API retu { publicFunction: function(options) { //something public here } } }; var someOptions = {...}; // create MyModule instance var test1 = new MyModule(); test1.publicFunction(someOptions); My goal is to obtain same structure but instead of directly creating an instance of MyModule, I'd like to instantiate the object (test1) after an ajax call. Something like this: // public API retu { publicFunction: function(options) { $.ajax({ url: options.someUrl, type: 'POST', data: options.someData, datatype:...
ادامه مطلبVote count: 0 I want to implement i18n in my application, which is written in HTML and JavaScript, with PHP as the backend. I have a JSON file, with all the keys and translations. Since I've read that JSON files caot be read from local storage, where would I store these JSON files, on XAMPP, so I can access them in my app? Also, can I directly access them using JavaScript, or would I need to use PHP? Thank you asked 1 min agoBillyBob Let's block ads! بخوانید...
ادامه مطلبVote count: 0 First off, let me apologize for my ignorance. I'm a new developer just trying to lea the ropes, and I've come across a roadblock here. I'll briefly explain my WP setup: Section div > Section class > section::before and ::after pseudo elements. I have inherit for my pseudo, so when I use my front end editor to change the border color size, etc. the pseudo follows. However, it only affects the same border as its parent. What I'm trying to do is have the border-right of the ::after pseudo use the same value that is entered as its border-bottom value. Hopefully that makes sense. I wish I had the words to more articulately explain what I'm going after. Please let me know if I need t...
ادامه مطلبVote count: 0 After calculating field in model I want to display this field in my template model: def _get_total(self): from inventory.models import Inventory from purchase.models import POproduct from sales.models import SOproduct # "Retus the total" retu Inventory.objects.filter(warehouse_Bin__material_UOM__UOM__material=self.id ).aggregate(Sum('quantity')) #- SOproduct.objects.filter(product__material=self.id).aggregate(Sum('quantity')) #POproduct.objects.filter(Product__material=self.id).aggregate(Sum('quantity')) total = property(_get_total) template: total on hand: {{ data.material.total }} However template displayed value in this format instead of plain numeric value total on hand: {'...
ادامه مطلبVote count: 0 Hi guys:)If I pass on the div in the example with mouse's pointer the function print in console two times,this menans that onmousemove event is triggered two times.Hoe is possible that onmousemove event is triggered considered that the div is 1 pixel width?How is possible that onmousemove event is triggered two times considered that the div is 1 pixel width? #div1{ height:200px; width:1px; background:red; } document.getElementById("div1").onmousemove= function(){ console.log("in mousemove function"); }; asked 1 min agoFistright Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm ruing a front-end app that allows users to enter a destination URL that can be any file type really. PDFs, or Word documents, or images. The app only needs to run in Chrome, and so I'd like to make the request to the file on the front end, and then send that data to a server for storage (and later, for downloading). I'm confused on how to do that. Should it be done via a Blob, ArrayBuffer? Any tips or directions would be great. Have been having trouble finding tutorials on this. asked 1 min agoonassar Let's block ads! بخوانید...
ادامه مطلبVote count: 0 When I upload my project to iTunes Coect. I get Archive upload failed due to the issues listed below. I'm not sure how to go about fixing this. Anyone have an idea? ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'NSHumanReadableDescription' in bundle myApp.app/PlugIns/ContentBlocker.appex is required." asked 1 min agoJay Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am a javascript newbie who's trying to transition from processing to javascript. Using Paper.js, I am simply trying to understand the equivalent of classes and their functions with the code below but keep having this error : Caot read property 'move' of undefine. function Apple (center) { this.color = 'red'; this.center = center; this.path = new Path.Circle(this.center, 50); this.path.fillColor = 'black'; retu this.path; } Apple.prototype.move = function(){ console.log('allo'); } var Apples = []; var nbA = 10; for(var i=0; i < nbA; i++){ var center = new Point.random() * view.size; Apples.push(new Apple(center)); } function onFrame(event){ for(var i=0; i < Apples.length; i++)...
ادامه مطلبVote count: 0 I'm trying to make a canvas jump. By jumping I mean moving up for a kinda sort time and then going down to the floor again. Something is obviously wrong because nothing happen when I press space. Can't think of what's wrong with my code, any ideas? var spaceKey = false; var player = { side: 20, x: 0, y: HEIGHT - 20, color: "red" }; context.fillStyle = player.color; context.fillRect(player.x, player.y, player.side, player.side); setInterval(update, 1000/60); function update(){ clearCanvas(); if (spaceKey){ jump(); } draw(); } function jump(){ // Moving the player 5 px up 60 times every 10ms. for (var i = 0; i < 60; i++){ function jumpUp(){ player.y -= 5; } setTimeout(10, jumpUp)...
ادامه مطلبVote count: -1 How to calculate price and quantity. I don't want to remove currency type. The price is php generated so i just want to show a calculated price when update quantity using jquery or javascript. Thank you. Here is working demo : $('input[name='quantity']').on('change keyup click', function() { var price = $('.price').text().substr(1); var quantity = $('.quantity').val(); $('.total').text(price * quantity); }); Total : $50.00 Price : $50.00 edited 58 secs agoj08691 asked 2 mins agoprotik Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Hi all i am a newby to enzyme. Following is my code. I need to test whether a functions retu the expected value getText= () => { retu 'sampleText'; } If you guys can help me with this. I .really appreciate . Kinda urgent asked 1 min agoSachin Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am wanting to use Google Adsense with an Ember site I'm working on. However, if I just copy the code block I get from Google I get this error: Error: `SCRIPT` tags are not allowed in HTMLBars templates (on line 3) After doing some searching, it seems some people has the same issue, but I have not found a solution for this. Does anybody have any ideas? asked 3 mins agoCaleb Sayre Let's block ads! بخوانید...
ادامه مطلب