Forum Replies Created
-
Author
-
January 30, 2017 at 2:46 am in reply to: jqxtab header size increases on dynamic tab creation jqxtab header size increases on dynamic tab creation #91083
All,
I have been dealing with this “jqxtab header size increases on dynamic tab creation” issue today on a test project and believe I found some useful information. Basically this is an observation. Beware of the Zoom level on your browser! This will happen when …
- Browsers: Any browser, any version ( obviously I could test every version ever made, but in the end the issue was consistent once I knew how to test for it.)
- JQuery Versions: I tested them all in JS Fiddle
- JQWidgets version: I tried a 2.x version using MVC and a 3.X version all with the same bad results.
- Browser Zoom level: The tab’s header will grow if zoom level is not 100%. If it is not 100% it can grow… and may be shrink at some smaller zoom level.( I think I saw this one time.
This does not solve the problem but this may save others some time in developing a work around.
I thought I was seeing a temporary solution when testing Fire Fox with latest Jquery. FYI I had just installed FireFox on the test Machine. My other browsers had been used significantly. I tried all versions of JQuery and FireFox and thought I had it working. But after some tedious testing and comparing using JSFiddle and the same code in an ASP MVC test page. I thought I had it resolved with Fire Fox. All other browsers: Edge, Chrome, and IE were just not working.
At some point I realized FireFox had unexpectedly started producing the same results … The header where the tab resides was growing every time I dynamically added a tab. Using the debug inspectors I could see the header growing just a pixel or two at a time. Not an issue for a adding a couple of tabs, but a lot when adding 6 or more.
I suspect that there is a rounding issue that occurs when the browser zoom is not 100%. It could be the JQWidgets code or its base code is calculating the image and trying to use partial pixels which results in a rounding issues.
In any case, If any one can find a work around it would be appreciated. I hope this info can help others working on this.
Regards,
Ben- This reply was modified 6 years, 10 months ago by Ben1.
Hi Peter and thanks for the response. I should have mentioned that I had confirmed that the MySQL server was returning data to other applications, just not within the browser using the example files. The PHP Mysql binding examples are fairly straight forward so that is why I started there. I have never used the data.php method and it was a bit hard to diagnose that at first, but that was obstacle. It had nothing to do with the grid.
I made progress and was able to get the examples I was testing to work…
To run these tests I have been using XAMPP v3.2.2. I installed the same day I started my testing. In short the PHP/MSQLi functionality was not performing as expected. It had nothing to do with the JQwidgets technology.
I am correct about the the expected output of the data.php file for the simpler JQwidget examples. See my post above. You should be able to browse to the data.php file and the browser should display JSON encoded text contents (of something like)…
[{"CompanyName":"Alfreds Futterkiste","ContactName":"Maria Anders","ContactTitle":"Sales Representative","Address":"Obere Str. 57","City":"Berlin"},{"CompanyName":"Ana Trujillo Emparedados y helados","ContactName":"Ana Trujillo","ContactTitle":"Owner","Address":"Avda. de la Constitucin 2222","City":"Mxico D.F."},{"CompanyName":"Antonio Moreno Taquera","ContactName":"Antonio Moreno","ContactTitle":"Owner","Address":"Mataderos 2312","City":"Mxico D.F."},{"CompanyName":"Around the Horn","ContactName":"Thomas Hardy","ContactTitle":"Sales Representative","Address":"120 Hanover Sq.","City":"London"},{"CompanyName":"Berglunds snabbkp","ContactName":"Christina Berglund","ContactTitle":"Order Administrator","Address":"Berguvsvgen 8","City":"Lule"},{"CompanyName":"Blauer See Delikatessen","ContactName":"Hanna Moos","ContactTitle":"Sales Representative","Address":"Forsterstr. 57","City":"Mannheim"},{"CompanyName":"Blondesddsl pre et fils","ContactName":"Frdrique Citeaux","ContactTitle":"Marketing Manager","Address":"24, place Klber","City":"Strasbourg"},{"CompanyName":"Blido Comidas preparadas","ContactName":"Martn Sommer","ContactTitle":"Owner","Address":"C\/ Araquil, 67","City":"Madrid"},{"CompanyName":"Bon app'","ContactName":"Laurence Lebihan","ContactTitle":"Owner","Address":"12, rue des Bouchers","City":"Marseille"},{"CompanyName":"Bottom-Dollar Markets","ContactName":"Elizabeth Lincoln","ContactTitle":"Accounting Manager","Address":"23 Tsawassen Blvd.","City":"Tsawassen"},{"CompanyName":"B's Beverages","ContactName":"Victoria Ashworth","ContactTitle":"Sales Representative","Address":"Fauntleroy Circus","City":"London"},{"CompanyName":"Cactus Comidas para llevar","ContactName":"Patricio Simpson","ContactTitle":"Sales Agent","Address":"Cerrito 333","City":"Buenos Aires"},{"CompanyName":"Centro comercial Moctezuma","ContactName":"Francisco Chang","ContactTitle":"Marketing Manager","Address":"Sierras de Granada 9993","City":"Mxico D.F."},{"CompanyName":"Chop-suey Chinese","ContactName":"Yang Wang","ContactTitle":"Owner","Address":"Hauptstr. 29","City":"Bern"},{"CompanyName":"Comrcio Mineiro","ContactName":"Pedro Afonso","ContactTitle":"Sales Associate","Address":"Av. dos Lusadas, 23","City":"Sao Paulo"},{"CompanyName":"Consolidated Holdings","ContactName":"Elizabeth Brown","ContactTitle":"Sales Representative","Address":"Berkeley Gardens 12 Brewery","City":"London"},{"CompanyName":"Drachenblut Delikatessen","ContactName":"Sven Ottlieb","ContactTitle":"Order Administrator","Address":"Walserweg 21","City":"Aachen"},{"CompanyName":"Du monde entier","ContactName":"Janine Labrune","ContactTitle":"Owner","Address":"67, rue des Cinquante Otages","City":"Nantes"},{"CompanyName":"Eastern Connection","ContactName":"Ann Devon","ContactTitle":"Sales Agent","Address":"35 King George","City":"London"},{"CompanyName":"Ernst Handel","ContactName":"Roland Mendel","ContactTitle":"Sales Manager","Address":"Kirchgasse 6","City":"Graz"},{"CompanyName":"Familia Arquibaldo","ContactName":"Aria Cruz","ContactTitle":"Marketing Assistant","Address":"Rua Ors, 92","City":"Sao Paulo"},{"CompanyName":"FISSA Fabrica Inter. Salchichas S.A.","ContactName":"Diego Roel","ContactTitle":"Accounting Manager","Address":"C\/ Moralzarzal, 86","City":"Madrid"},{"CompanyName":"Folies gourmandes","ContactName":"Martine Ranc","ContactTitle":"Assistant Sales Agent","Address":"184, chausse de Tournai","City":"Lille"},{"CompanyName":"Folk och f HB","ContactName":"Maria Larsson","ContactTitle":"Owner","Address":"kergatan 24","City":"Brcke"},{"CompanyName":"Frankenversand","ContactName":"Peter Franken","ContactTitle":"Marketing Manager","Address":"Berliner Platz 43","City":"Mnchen"},{"CompanyName":"France restauration","ContactName":"Carine Schmitt","ContactTitle":"Marketing Manager","Address":"54, rue Royale","City":"Nantes"},{"CompanyName":"Franchi S.p.A.","ContactName":"Paolo Accorti","ContactTitle":"Sales Representative","Address":"Via Monte Bianco 34","City":"Torino"},{"CompanyName":"Furia Bacalhau e Frutos do Mar","ContactName":"Lino Rodriguez","ContactTitle":"Sales Manager","Address":"Jardim das rosas n. 32","City":"Lisboa"},{"CompanyName":"Galera del gastrnomo","ContactName":"Eduardo Saavedra","ContactTitle":"Marketing Manager","Address":"Rambla de Catalua, 23","City":"Barcelona"},{"CompanyName":"Godos Cocina Tpica","ContactName":"Jos Pedro Freyre","ContactTitle":"Sales Manager","Address":"C\/ Romero, 33","City":"Sevilla"}]
Peter’s example files also work (in his explanation above). But, Peter’s example data.php file is a bit more complex and does not return the JSON encoded data, if browsed directly. But, it works fine in conjunction with the rest of its example files.
Cause of the issue…The data.php file is using MSQLi methodology to connect to the database but was having issues on my system yesterday. I suspect the XAMPP PHP functionality was not working right and was not displaying any useful information. I found a suggestion on the Internet from someone else that the XAMPP PHP ext folder may need to be given read permissions to the /User. Mine did already have the READ permissions, so I gave my /User all permissions to this folder (test environment only) and the data.php file is working now.
I know this is a long winded explanation, but I am hoping some of the OTHER PHP testers having a similar issue can benefit from this info.
Regards,
BenHello Guys,
I am using a fresh download of the jqwidgets zip files with demos, version 3.9.1.
I have been trying to do these PHP MySQL data binding examples but I keep getting the same result… no data is displayed. I do see it working on your demos, but when I try to replicate this on my local server, it just does not work. I tried the previous example that Peter describes and it gives the same results. Ultimately, In the debug process I think I should be able to browse to the URL for the “data.php” file and which should “echo” the data in JSON format.
Instead the browser display a portion of the “data.php” file. as follows:
prepare($query); $result->bind_param('ii', $start, $pagesize); } else { $result = $mysqli->prepare("SELECT SQL_CALC_FOUND_ROWS CompanyName, ContactName, ContactTitle, Address, City, Country FROM Customers LIMIT ?, ?"); $result->bind_param('ii', $start, $pagesize); } } else { $result = $mysqli->prepare("SELECT SQL_CALC_FOUND_ROWS CompanyName, ContactName, ContactTitle, Address, City, Country FROM Customers LIMIT ?, ?"); $result->bind_param('ii', $start, $pagesize); } /* execute query */ $result->execute(); /* bind result variables */ $result->bind_result($CompanyName, $ContactName, $ContactTitle, $Address, $City, $Country); /* fetch values */ while ($result -> fetch()) { $customers[] = array( 'CompanyName' => $CompanyName, 'ContactName' => $ContactName, 'ContactTitle' => $ContactTitle, 'Address' => $Address, 'City' => $City, 'Country' => $Country ); } // get the total rows. $result = $mysqli->prepare("SELECT FOUND_ROWS()"); $result->execute(); $result->bind_result($total_rows); $result->fetch(); $data[] = array( 'TotalRows' => $total_rows, 'Rows' => $customers ); echo json_encode($data); /* close statement */ $result->close(); /* close connection */ $mysqli->close(); ?>
Your help would be appreciated.
Thanks,
Ben -
AuthorPosts