Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

4 Neutral

About ibrahimjan

  • Rank
  1. Like astralaaron said using closest class and the index class in jquery you can get the index of the tr, have a look at the fiddle. https://jsfiddle.net/8hL46ftj/ hope this helps $('img').click(function(){ alert($(this).closest('tr').index()) })
  2. thank you, what I did was changed the vale of group_concat_max_len from my.ini permanently, that worked very well.this is what I found out: The result is truncated to the maximum length that is given by the group_concat_max_len system variable, which has a default value of 1024. The value can be set higher, although the effective maximum length of the return value is constrained by the value of max_allowed_packet. The syntax to change the value of group_concat_max_len at runtime is as follows, where val is an unsigned integer: SET [GLOBAL | SESSION] group_concat_max_len = val;-- http://dev.mys
  3. Hi I created a relations sql statement between three tables, the problem is that my table tx and img is limited to only 1024 characters, is there a way I can change the data typ to display more than that, like use type = TEXT?? This is my statment: SELECTCONCAT('{"weID":"',wb.weID, ',"size_h":"',wb.size_h, ',"size_w":"', wb.size_w,'","text":[') as bs, CONCAT (GROUP_CONCAT(DISTINCT'{"weID":"',wt.weID,'","txtID":"',wt.txtID, '","txtText":"', wt.txtText, '","txtColour":"', wt.txtColour,'"}')) as txt, CONCAT(GROUP_CONCAT(DISTINCT '{"weID":"',wi.weID,'"',',"imgName":"',wi.imgName,'","imgName":"'
  4. ibrahimjan

    CONCAT sql

    Hi All, I got this sql connection to my table wb, it all seems to work fine in phpmyadmin, when testing sql, but when i want to us it, it comes up with: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING inC:\----------\test3.php on line 75 line 75 is the $query_wb $query_wb = "SELECT CONCAT( "[", GROUP_CONCAT( CONCAT("{weID:'",`weID`,"'"), CONCAT(",weName:'",`weName`,"'}") ) ,"]") AS json FROM wb;"; any Ideas how to make it work??
  5. Ok I think I got my SQL sorted, it's a full array now, but have to change my original PHP.Any help in changing my original PHP to outpu like the above json string, is much appreciated. "SELECT wb.weID, size_h, size_w, imgID, imgName, txtID, txtText FROM wb JOIN wi ON wi.weID = wb.weID JOIN wt ON wt.weID = wb.weID WHERE wb.weID = '-126555895'"
  6. Ok, what I need to do is loop through $back to show all rows, at the moment its only displaying one which is "-126555895" obviously as set in the sql statement, but maybe I need to change my sql to show all records of $back, but $images and $text need all to show corresponding joint data by "weID" and I am having proper difficulties joining them. At the moment it's easy to set up because we are only showing one record "-126555895", I need to show all the records in the above json layout. I hope this makes senesce, its very hard to explain multidimensional arrays, any help is appreciated.
  7. Please have a look at my json data to see what I want to do: [ { "weID": "-126555895", "size_h": "700", "size_w": "494", "images": [ { "imgID": "1535689403", "imgName": "1321865407" } ], "text": [ { "txtID": "-1892792786", "txtText": "4.99" }, { "txtID": "1583276033", "txtText": "$" } ] }, // i cant seem to loop through my data to get more results looking like this:{ "weID": "3444555435", "size_h": "500", "size_w": "294", "images": [ { "imgID": "-454646555", "imgName": "77774433" }, { "imgID": "1535689403", "imgName": "1321865407"
  8. If new data is created or updated on the server on a regular intervals, the js needs to check every 5sec or so to reload the new data, the ASP file is producing the new data. to prove that at the moment the only way to see the new data take place is by refreshing the full page. Can I not just refresh the Div's or that wont work?? thanks
  9. I added setinterval around the ajax, but I am getting the data to reload new set every 5sec, rather than refreshing the current data? please have a look. setInterval(function(){ $.ajax({ dataType: "json", url: "/jsondata.asp?LAYID=-1707637504", cache: false, success: function(data, status) { for(var i = 0, l = data.length; i < l; i++){var d = data[i]; $('.inner').append('<p><h1>' + d.DesignID + '</h1></p>'); //This is the Text Array/// for(var j = 0, k = d.Text.length; j < k; j++){ $('.inner').append('<p><h2>TE
  10. Hi I moved things around a bit, and came up with the following. Is there any way I can add a refresh function, to get new json data every 30 sec?? without refreshing the page. Thanks. $.ajax({ type: "GET",data: "{}",contentType: "text/plain",dataType: "json",url: "/jsondata.asp?LAYID=-1707637504", cache: false,success: function(data, status) { for(var i = 0, l = data.length; i < l; i++){ var d = data[i]; $('.inner').append('<p><h1>' + d.DesignID + '</h1></p>'); //This is the Text Array///for(var j = 0, k = d.Text.length; j < k; j++){ $('.inner').ap
  11. Thank you, I see what you mean, much better approach thanks. it seems to be working fine now, thank you for your time.
  12. Hi I have a json Data coming from an ASP script, this works all fine, please have a look at the data at:http://jancodesign.c...YID=-1422732274now I have created my JS to read this data please have a look at: http://jancodesign.com/js/JsonRead.js The problem is that I get the "DesignID" to show but not the "TxText" instead of the data to show I get "undefined"Any Ideas as why this is happening??Thank you
  13. I tried it with changing the JS, and it seams to refresh with the QueryString fine, please have a look at bottom part of the JS. <%test1 =request.QueryString("test1")%><script type='text/javascript' src='/aspajax/aspajax.asp?ixsf23x4sn=s83hjdhj'></script><script type='text/javascript' >ASPAjax.activateDOM('PageNav','MainContent',true,true,true); </script><span class='asp-ajax-loader' style='position:absolute' id='AJAXLOADER_____MainContent'></span><div style='display:inline' id='AJAX_____MainContent'> <h1> Main Cotent </h1><%re
  14. Ok this is my live link http://www.jancodesign.com/test3.asp?test1=testing The simple idea is to be able to pick up data from the DB up to date and constantly refreshing the new data on the page, thats where the refresh comes in, it seams to work fine with out a QueryString, if you modify the asp file manually and upload it to the server it seams to refresh the content without intervention. The code generated from the ASPAjax is: <script type='text/javascript' src='/aspajax/aspajax.asp?ixsf23x4sn=s83hjdhj'></script><script type='text/javascript' >ASPAjax.activateDOM('PageNa
  15. ibrahimjan

    Using ASPAjax

    Hi All,I was not to sure where to post this ASP or JS, anyways it has both elements in there so hopefully some one can help, I am using a ASPAJAX library for AJAX functionality, what I need the following code to do is refresh but still to use the "test1" variable, at the moment when it refreshes it does not load the request.query from the URL?? Any ideas how I can still use the same QueryString?? when it refreshes The library can be downloaded from the following link ASPajax with full SDK <!--#include virtual="/aspajax/aspajax.asp"--> <% ASPAjax.Open() ' Set up ASPajaxtest1 =request
  • Create New...