client-side

Why doesn't my form post when I disable the submit button to prevent double clicking?

你。 提交于 2019-11-30 09:16:26
Like every other web developer on the planet, I have an issue with users double clicking the submit button on my forms. My understanding is that the conventional way to handle this issue, is to disable the button immediately after the first click, however when I do this, it doesn't post . I did do some research on this, god knows there's enough information, but other questions like Disable button on form submission , disabling the button appears to work. The original poster of Disable button after submit appears to have had the same problem as me, but there is no mention on how/if he resolved

How to read from Serial port in a webpage

China☆狼群 提交于 2019-11-30 08:45:33
问题 I want to design a webform that user should fill some fields. The value of one field should be read from Serial port (COM1) of client computer which a special hardware is connected to it and the user presses the Send to PC key of the hardware when filling the form. How i can listen to COM1 port in my webpage and get the value of COM1 and place it in the web form automatically? I heard that ActiveX controls can do this but it is compatible only with IE (right?). The other option is Java

Resetting visited status on links

若如初见. 提交于 2019-11-30 08:30:13
Is there any way you can reset the visited status on links? The scenario is this: On an intranet-site which naturally has a lot of links we want a link to have the status of "visited" for a set period of time only. I am therefore looking for a way to manipulate the visited status of links. Is this doable? It should be cross-browser of course. ETA: Client-side solutions are perfectly acceptable. Preferred even.. :-) ETA-2: Cookies are allowed. No holds barred here :-) Links appear as "visited" when the browser chooses to apply the :visited CSS pseudo-class . The client-side way to reset links

Why do people minify css and javascript, when we have gzip? [duplicate]

纵饮孤独 提交于 2019-11-30 08:11:32
问题 This question already has answers here : Is there a benefit to minifying JavaScript before gzipping it? (5 answers) Closed 6 years ago . Why people go through all the pain of minifying JavaScript and CSS files if they can just turn on gzip compression on the web server? This will give the same (or even better) result in traffic preformance. Does minification give additional benifits? 回答1: You can use gzip (which is usually built into web servers) in combination with Minification. Minification

Use psql's \\copy for a multi-line query

不打扰是莪最后的温柔 提交于 2019-11-30 07:59:24
This is a follow-up question from this answer for " Save PL/pgSQL output from PostgreSQL to a CSV file ". I need to write a client-side CSV file using psql's \copy command . A one liner works: db=> \copy (select 1 AS foo) to 'bar.csv' csv header COPY 1 However, I have long queries that span several lines. I don't need to show the query, as I can't seem to extend this past one line without a parse error: db=> \copy ( \copy: parse error at end of line db=> \copy ( \\ \copy: parse error at end of line db=> \copy (" \copy: parse error at end of line db=> \copy "( \copy: parse error at end of line

Meteor using a local connection results in error: insert failed: 404 — Method not found

隐身守侯 提交于 2019-11-30 07:16:29
问题 I've got a meteor collection on the client side Friends = new Meteor.Collection("Friends"); Meteor.subscribe("Friends"); I have a user authenticate with facebook and I want to grab a list of their friends: FB.api("/me/friends? auth_token="+response.authResponse.accessToken, function(response){ for (i = 0; i<response.data.length;i++){ Friends.insert(response.data[i]); } ); I have a function to get that list: Template.Friends.all_friends = function(){ return Friends.find(); } I have a template

com.sun.faces.ClientStateSavingPassword - recommendations for actual password?

↘锁芯ラ 提交于 2019-11-30 05:30:14
In all of the reference pages I've found with regards to encrypting the ViewState, the only comment on the password is "your password here". Are there any recommendations regarding the length / complexity of the password that we should use? Depends on Mojarra version. It had several flaws/fails in earlier versions. In Mojarra 1.2.x - 2.1.18 , it was never actually used. The JNDI entry name was namely incorrectly documented. It was documented as com.sun.faces.ClientStateSavingPassword (with same prefix as Mojarra's other web.xml context parameters ), but the code actually checks for

How to programmatically create a client side file in Javascript that can be downloaded by the user? [duplicate]

ε祈祈猫儿з 提交于 2019-11-30 05:27:54
This question already has an answer here: How to create a file in memory for user to download, but not through server? 19 answers I wanted to experiment creating a Javascript application that takes input from the user in a form and then generates a file based on the user's form input. The file should then be downloadable by the user all without touching the server. How do you create a file on the client side with JavaScript and where on the client side could it be stored so that it can be downloaded without being first created on the server? Update: To be more specific as Graham answered, I

OpenSSL client not sending client certificate

老子叫甜甜 提交于 2019-11-30 03:28:24
问题 I am struggling with a client certificate problem and hope somebody here can help me. I'm developing a client/server pair using boost asio but I'll try to be unspecific. I'm on windows and using openssl 1.0.1e Basically, I want to have client authentication by using client certificates. The server shall only accept clients that have a certificate signed by my own CA. So I have setup a self signed CA. This has issued two more certificates. One for the client and one for the server. Both signed

Disable X-Frame-Option on client side

不打扰是莪最后的温柔 提交于 2019-11-30 01:13:40
问题 I would like to disbale the X-Frame-Option Header on client side on Firefox(and Chrome). What I've found: Overcoming "Display forbidden by X-Frame-Options" A non-client side solution isn't suitable for my purpose https://bugzilla.mozilla.org/show_bug.cgi?id=707893 This seems to be pretty close. I tried creating the user.js in the profile dir with the code user_pref("b2g.ignoreXFrameOptions", true); but it didn't work. The second last entry seems to imply compiling ff with modified code? If