Posts by Bruno Nascimento • 489 points
26 posts
-
1
votes1
answer550
viewsQ: How to use psr-4 in the Composer with different subfolders
I am creating a test framework. I use Composer to create the structure of my project. The file Composer.json looks like this: { "autoload": { "psr-4": { "App\\": "src/app/mvc/" } } } I divided my…
-
1
votes2
answers109
viewsQ: How to ensure that a SESSION expires if the user accesses a copy of the application that is in another directory
I have a php application where I use Sessions for login control. The application is in meusite.com/minhaapp (I will call App1) It turns out that for testing I created an instance of my application…
-
2
votes2
answers42
viewsA: Recovering DOM objects ordered by a criterion
I decided a little differently from my colleagues. I thought it was simpler. I created this Jsfiddle also. var $obj = $('.testGrid'); $obj.find('.test').sort(function(a, b) { return a.dataset.gsX -…
jqueryanswered Bruno Nascimento 489 -
2
votes2
answers42
viewsQ: Recovering DOM objects ordered by a criterion
It would be able to capture all the DOM objects and sort them by a set of rules. For example, in the code below the attributes data-Gs-x="0" data-Gs-y="0" define the position (x, y) on screen. I…
jqueryasked Bruno Nascimento 489 -
0
votes1
answer2605
viewsQ: Is it possible to create an iframe for a specific part of a page?
You can get a specific part of a site by mapping it to an iframe? I’ve seen some solutions using css, but it doesn’t give the effect of fixing the region. clip: rect (top, right, bottom, left)…
-
0
votes0
answers217
viewsQ: How to capture the click and drag of a DOM object
I have a div that wants to fire a function if the user clicks and drags. A div can be positioned in different places on the grid. I use the gridStack plugin. I want to get the final position of the…
-
0
votes1
answer301
viewsQ: How to capture an object that has a modified attribute value
I have an object that can be updated from a drag-drop interaction with a grid-stack object (https://github.com/troolee/gridstack.js#questions-and-Answers). Depending on the object update (change of…
jqueryasked Bruno Nascimento 489 -
2
votes1
answer316
viewsQ: How to insert title to a Table Charts from the google Chart API
In the Google Chart documentation there is the possibility to insert titles for a specific chart. But for Table Chart it does not work. Would anyone have an idea of how to pass to the component the…
-
1
votes1
answer214
viewsQ: How to pass null value via json_encode
How can I pass a php json to jquery with null values. I have the structure below: $data1 = null; $data2 = null; $data3 = null; json_encode(array( 'html'=>$html, 'data1'=>$data1,…
-
0
votes1
answer105
viewsQ: How to run a Rigger after another Rigger
How to make the second Trigger only run after the first Trigger to load the html completely? $('#element-one').trigger('click'); // aguardar o primeiro ecento (carrega um html via ajax)…
jqueryasked Bruno Nascimento 489 -
1
votes2
answers1179
viewsQ: How to get a specific region from an iframe?
I created an iframe from any site. I would like to define a specific region. It is possible to do this?
-
4
votes1
answer122
viewsQ: Turning a datatable into an array with jquery
I have as output a string with the following format. [["link"],["<iframe id='player' type='text/html' width='452' height='272'…
-
0
votes1
answer37
viewsQ: Error in jquery return
I’m using php + jquery return is a string of type [["local","pressão instantânea"],["Campo Grande",1010.6],["Campo Grande",1011.1],["Campo Grande",1010.2]] Being that in the return comes some…
-
0
votes1
answer7397
viewsQ: Placing scroll in a table so that it does not cross the limits of the window size
I have a table that has many columns. I want it to be at most the size of the window. The problem is that it passes the window. How to place a scrool if the content moves the window size…
-
0
votes0
answers120
viewsQ: Copy DOM objects as new object with JQUERY
I want to insert a copy of one content into two Ivs I made a clone and then wanted to make an append. Since append moves the contents of the last Insert in DOM. var copia =…
-
4
votes1
answer21098
viewsQ: Formdata() object for sending files via ajax Jquery
I need to send data from a form via ajax to the server (php). I used the Formdata() object but to no avail. Part of my jquery: var formdata = new FormData($("#myform")); var link = "form/insert";…
-
1
votes1
answer405
viewsQ: Setting an option value in a jQuery Multiselect dropdown
I’m using the library Bootstrap Multiselect: $("select#final option[value='" + data[0].final + "']").prop('selected', true); $('select#final').multiselect("refresh"); As the above code I want to…
-
1
votes1
answer70
viewsQ: Dynamically triggering combos for DOM creation via jQuery
I have a sequence of 3 dropdowns that modify the DOM. One depends on the other. If I select the first dropdown it modifies the DOM and the other dropdown. The second dropdown modifies the third in…
-
4
votes2
answers579
viewsQ: How to pass an array of php Stdclass objects to a JS variable using $.ajax() jquery
I have the structure below. I need to access each value in jquery. Array ( [0] => stdClass Object ( [post_id] => 140 ) [1] => stdClass Object ( [post_id] => 141 ) [2] => stdClass…
-
4
votes1
answer55
viewsQ: How to create an element with levels and then add elements in one of its sublevels with jquery?
I need to create the object with the structure below and insert options. myElem = $("<div class='row'> <div class='form-group'> <label for='multiple-selected' class='col-md-offset-1…
jqueryasked Bruno Nascimento 489 -
2
votes1
answer343
viewsQ: How to catch an element via jquery in an object created in the bootbox.js plugin?
I have an object created inside a container-Fluid div. I create the object Bootbox without any problem to generate a modal confirm (code below). $("div.container-fluid").on("click",…
jqueryasked Bruno Nascimento 489 -
0
votes1
answer133
viewsQ: Conversion of an "array" string to a javascript array
I have a data that comes as a parameter of a function. [['local','precipitação'],['RJ',0.2],['SP',0.8],['MG','']] This data should be recognized as array but javascript recognizes as string. Is…
javascriptasked Bruno Nascimento 489 -
0
votes3
answers272
viewsQ: is_numeric does not work with decimal separator ,
I’m using the function is_numeric in the case below does not work. For example, if $val = 0,2 I want it changed to 0.2 Just to contextualize the other values could be: a string => in this case I…
phpasked Bruno Nascimento 489 -
2
votes1
answer274
viewsQ: How to recover the value of multiple dropdownlists (only filled)
How can I recover the value of several dropdown (only filled) The function below does not work correctly. For example, if I select only the second combo has as output: ,2 It picks up the void as if…
-
2
votes0
answers353
viewsQ: htaccess configuration to capture all GET data from a query string
I rewrote my url rule as follows: RewriteRule ^(.+)$ index.php?path=$1 [QSA,L] In php I get the parameters of $_GET['path'] and configure my controller, action and parameters. $this->controlador,…
-
2
votes3
answers360
viewsQ: Input type="text" field does not fill data with more than one word
When loading a data into an input only the first word is loaded. Example: '</form> <input type="text" value='.$result->name.' >'; $result->name contains the value "Hello World".…