All Questions
Tagged with javascriptjquery
121 questions
0votes
1answer
57views
When should javascript files be loaded
I am using a great deal of jquery. I have several "sub-pages" that are loaded into a main div by a menu click. Each of those sub pages has an associated javascript file. I have been loading the ...
1vote
1answer
60views
Does it make sense to use reflection or to hard-code controller parameter names in JavaScript?
So I have made a pull request to change this code: //Controller: ... [HttpPost] public ActionResult Unauthorize(int userID, int permissionID) { ...
3votes
4answers
715views
Should one-line functions be avoided in jQuery/JavaScript?
So, I had a coworker complain about how I made the following code: ... var foo = getKendoDropdown(window.foo); var bar = getKendoDropdown(window.foo); var sna = getKendoDropdown(window.sna); var fu = ...
2votes
1answer
473views
handle file downloads from the server
I am wondering if the following would be a good technique to allow user to download files from the server in the below scenario: Info about the scenario: User logs into a system (HTML,JQuery and CSS,...
0votes
1answer
3kviews
How to impersonate user in web app?
I am building an intranet web app with ASP.NET. We are using Windows authentication for granting access to different web pages. We grab your Windows login server side, then build web pages ...
2votes
1answer
110views
Are there standards for handling card swipers in applications?
I'm in the middle of creating a web application for a client, and he wants me to integrate magnetic card swipers so his office staff can quickly swipe a card, and load up details for specific patients ...
-3votes
1answer
130views
Is there a best practice for naming class selectors for identification alone
Is there a best practice for naming class selectors for identification alone? For example, for defining a single amount field with action button, we end up creating several div containers and div ...
-1votes
1answer
1kviews
Hosting a static website containing JavaScript/jQuery
I have customized a free downloaded web template as my simple, static website. It contains HTML, CSS, and JavaScript/jQuery. I want to make it live, and am confused from where to host it. The hosting ...
0votes
1answer
231views
Using CSS classes to express state
Is it good practice to express the state of an HTML element--such as whether an input's value is valid--using a CSS class? Would it be better practice to use data attributes, the properties of a ...
5votes
2answers
353views
I keep bouncing from "god function" to "tiny SRP functions" how do I break this cycle?
This question is important for me in growing in my technical abilities. I find I swing from end-to-end, like a pendulum, in writing code that is simultaneously DRY yet readable & efficient. And I'...
1vote
0answers
60views
How do I protect JS local scope but allow outside customization?
I am creating a javascript application that will live in a library and be used on multiple sites. I am looking for it to have the following features and need some guidance on accomplishing these goals:...
5votes
1answer
923views
Visitor pattern. Operating on the nodes of a tree
I am working with jQuery like elements from the cheerio library to manipulate SVG images. These objects represent XML nodes and have a hierarchical internal structure. I am writing a function (in ...
2votes
0answers
1kviews
Drag and Drop with animations
This is more of a theoretical question which I hope is okay!? I want to code my own drag and drop jQuery plugin, but i'm wondering the best way to go about structuring my code and actually doing it. ...
5votes
2answers
559views
Stopping client-side Javascript from turning into a monolith
I'm developing some Javascript front-end code using JQuery with some back-end JSON webservices. IDE is Netbeans, and debugging using that and Chrome. Coming from a C++ background I'm used to small ...
4votes
1answer
2kviews
Collecting user input to use as query with API
I'm attempting to collect the user's input and execute a search using an API. At this point, I can use the API (ebay search) by typing keywords into the html document- but I want the user to be able ...