Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
im trying to build something almost like a cashier system with php jquery and html
so im confuse about the point system
i got a simple input here :The input form
so the user will input their total price and base on that they'll get point ,
so for example user will get 1 poin every $10 , so when the user input $15 he's got 1 poin , and when the user input $13, he's still got 1 point, but when user input $20, he's gonna get 2 point , so thats basically thats how the system work, and my question is how to achieve that kind of system with php
you can use:
$points = floor($price/10);
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
As you can see on the picture, I've a big table with all my products of my virtual webshop. This view is the admin panel. All the data you can see in the input field are fetched with a select statement when the page loads.
What I want to realise: When someone edits the value of an input field at different places in the table, this specific data should be updated in my database.
What is the best way to realise this? Do I need to work with multi-dimensional arrays? Fetch all the data of that input field and overwrite all my database with update statement?
I would add the id of the row in the edit form. So you can send that with the changed values to the backend. Now you can update only that changed row in the database.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
How to handle following scenario in a generic way...I am looking to implement the following things for multiple web pages.(So, please help me out BY SUGGESTING ANY GENERIC way).
Scenario:
If a webpage/form has a 4 mandatory fields(text box).
If i select 2nd field by skipping the first one
Then, first mandatory field text box should be shown with red border.
When the focus event fires on any form control, loop over all the form controls (this.form.elements will give you an ordered collection) and run your validation routine on each in turn. Break out of the loop when you reach the currently focused element (i.e. when this.form.elements[i] === this).
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I need to create form input field for inputing bank account number. Than number has max = 18 number and min 18 numbers.
algorithm is next (3+13+2)
So i cant use clasic input text box i need special text box where i will have slash that separates that numbers like on screenshot:
How can i create textbox like above using javascript and html
This is very similar to this question: How to implement an input with a mask
The selected answer includes a link to a jQuery plugin that would work like this for your example:
$(function(){
$("#field").mask("999 - 9999999999999 - 99");
});
Of course javascript can't solve everything and inputs should be validated server side as well.
sometime ago I used a pluggin named "formatter.js" it is really easy to use, I will give you and example:
var formatted = new Formatter(document.getElementById('elementToFormat'), {
'pattern': '{{999}}-{{9999999999999}}-{{99}}',
'persistent': true
});
you can find that library to download and find the documentation in the following link, here or you can install that with bower
bower install formatter
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am new to webpage design and I was wondering if I could get some piece of advice.
I have created a table using HTML that has 2 columns and "N" number of rows say 10. I want the first column to hold time values while the second to hold comments. For now I want both the time and comment values for the rows to be input by the user and saved into a database as soon as they are entered.
I thought about putting text boxes inside each cell of the table and trying to save the data that way but not all cells will be filled for a bigger table.
What would be the best way to save the table values into a database.
I think for you requirement you will need to use a Grid which will handle most of the things for you.
Have a look at jqGrid.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a Javascript Bookmarlet, in which I want to grab a price that might be displayed on the current page.
So for example on shopping sites it could grab the price of an item the user is currently looking at.
I figured one way would be to grab all the text on the page, perhaps with something like get web page text via javascript
And then from there filter to get just the number after a currency symbol is found (£,$ etc) which should in theory leave just the Price.
However I am now sure how I would go about actually filtering to just the number, and if this is at all the right way to go about this?
How about get the text value of mark up?
E.g. Say you had:
<span id="price">£5.00</span>
You could do the following with jQuery:
$('#price').text();
Or vanilla javascript:
document.getElementById('price').innerText
Provided there is infact a wrapper around the text or you have access to the markup.