Jump to content

Deks

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by Deks

  1. Thanks , i hope it will help
  2. Hello, sorry i have forgot to put what is my purpose with it. I wanna replace all chars from begining of each word and make first letter upper. I now how to do it, just can't do it with croatian special chars. Thanks fro replies.
  3. Hello, i have small problem with replacing croatian letters. I am using jQuery, and am trying to replace croatian letters č,ć,š,đ,ž but dunno how to put this in regex. For now i have regex for all chars: $('#text').replace(/\b[a-z]/g, 'somechars' ); Unfortunately it wont reconize croatian special letters. Thanks. Regards
  4. Hello, am using iframe and not div because i need to call stored procedure inside procedure (sql query inside sql query) and i think my database don't like it. So i used first procedure and sent results to another script which i call with iframe. Thanks
  5. Hello, am using iframe to show dynamic data gained from sql query. So i get to little problem. Height of content is not always same. Is there any way where iframe can change height based on iframe content? some code would be perfect. Thanks.
  6. yea i know its bad idea, and link u gave me is ok..but problem is am calling 2 procedures. Also second procedure use result from first procedure. Any idea how to do it? thx.
  7. Hello, i have one little problem and can't pass it. Problem is i need to call new sql query inside another query. Am trying to make accordion which will put result of first query($sql) like title and result of second query($sql2) like list of current item. All time am getting error : I know reasone is because i use query inside query so am trying to figure is there any way to bypass it or make it work. Example: $sql="EXECUTE _PROCEDURE1 '".$date."',''.$code."; $rs=odbc_exec($conn,$sql); if (!$rs){exit("Error in SQL");} while (odbc_fetch_row($rs)){ $id_number=odbc_result($rs,"ID"); $name=odbc_result($rs,"NAME"); echo $id_number.' - '.$name; $sql2="EXECUTE _PROCEDURE2 '".$id_number."',''.$name."; $name=odbc_exec($conn,$sql2); while(odbc_fetch_row($popust)){ $detail = odbc_result($sql2,"DETAILS"); $detail2 = odbc_result($sql2,"DETAILS2"); $detail3 = odbc_result($sql2,"DETAILS3"); echo $detail.' - '.$detail2.' - '.$detail3; } } I hope i explained it well. Thanks.
  8. but then window won't be set on fullscreen. I just wanna stop window dragging. Is that possible? Am making application for company so users will stay thanks.
  9. Hello, i need for my project fullsize browser window. Is there any was to lock browser on his fullscreen so users cant use drag to move him? I know that i can open predefined window but how to lock his size on drag? window.open('test.php','mywindow','resizable=no,fullscreen=yes') Thanks.
  10. Hello, am using Jqgrid and Jquery for making my webpage. I have some problems with implementing jqGrid with jquery layouts. Problem is with resizing grid on browser window resize. Height is working correctly but problem is width. It is like grid width won't refresh sometime. Also if i close left pane grid doesn't recognize new width and it stay on old. To be short, i need grid width is 100% of window width. For my testing am using source code from http://www.trirand.com/blog/jqgrid/jqgrid.html# . I tried with setTimeout(function(){ $('#' + gridId).jqGrid('setGridWidth',gridWidth); }, 500); but same things happens. My code for resizing grid: $resize = <<<RESIZE if (document.body && document.body.offsetWidth) { winHeight = document.body.offsetHeight; } if (document.compatMode=='CSS1Compat' && document.documentElement && document.documentElement.offsetWidth ) { winHeight = document.documentElement.offsetHeight; } if (window.innerWidth && window.innerHeight) { winHeight = window.innerHeight; } wHeight = winHeight - 90; $("#grid").jqGrid('setGridHeight',wHeight); jQuery(window).resize(function(){ gridId = "grid"; if (document.body && document.body.offsetWidth) { winHeight = document.body.offsetHeight; } if (document.compatMode=='CSS1Compat' && document.documentElement && document.documentElement.offsetWidth ) { winHeight = document.documentElement.offsetHeight; } if (window.innerWidth && window.innerHeight) { winHeight = window.innerHeight; } setTimeout(function(){ gridId = "grid"; gridWidth = $('#gbox_' + gridId).parent().width(); $('#' + gridId).jqGrid('setGridWidth',gridWidth); }, 100); wHeight = winHeight - 90; if(wHeight < 110){ wHeight = 110; $('#'+ gridId).jqGrid('setGridHeight',wHeight); }else{ $('#'+ gridId).jqGrid('setGridHeight',wHeight); } }) RESIZE; $grid->setJSCode($resize); Also in index.php am using jQuery(document).ready(function(){ $('body').layout({ resizerClass: 'ui-state-default', east__onresize: function (pane, $Pane) { jQuery("#grid").jqGrid('setGridWidth',$Pane.innerWidth()-2); } }); }); I hope someone have some experiannce and can help me. Thanks. Regards
  11. Can anyone please give some idea, i still didn't found out solution. Thanks.
  12. Hello, i wanna make browser resizable = false at some point of resizing my browser window, is that possible? Here is code where i wanna implement it . winHeight = window.innerHeight; //get innerHeight wHeight = winHeight - 90; //reduce it to fit with grid $("#grid").jqGrid('setGridHeight',wHeight); jQuery(window).resize(function(){ gridId = "grid"; gridWidth = $('#gbox_' + gridId).parent().width(); $('#' + gridId).jqGrid('setGridWidth',gridWidth); //resize width winHeight = window.innerHeight; wHeight = winHeight - 90; if(wHeight < 110){ wHeight = 110; //stop resizing grid $('#'+ gridId).jqGrid('setGridHeight',wHeight); }else{ $('#'+ gridId).jqGrid('setGridHeight',wHeight); //resize height } So i want that my browser can't be resizable to lower when he have, for example, width =360 and height =110. Any ideas? Thanks.
  13. Hi, here is my whole php code for TCPDF template. <?php require_once('../../php/tcpdf/config/lang/eng.php'); require_once('../../php/tcpdf/tcpdf.php'); //connection to database include "connect.php"; // create new PDF document $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); //set auto page breaks $pdf->SetAutoPageBreak(false, PDF_MARGIN_BOTTOM); // set document information //$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); // set default header data //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 061', PDF_HEADER_STRING); // set header and footer fonts //$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); //$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); // remove default header/footer $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); // set default monospaced font //$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); //set margins //$pdf->SetMargins(0, PDF_MARGIN_LEFT, 0); //$pdf->SetMargins(20, PDF_MARGIN_TOP, 20); $pdf->SetMargins($left=0, $top=0, $right=0, $keepmargins=false); //set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set some language-dependent strings $pdf->setLanguageArray($l); // set font //$pdf->SetFont('helvetica', '', 10); //---------------------------------------------------------- // add a page $pdf->AddPage('P', 'A5'); //$pdf->Cell(0, 0, 'A5 PORTRAIT', 1, 1, 'C'); //=========================================================== $logo ='QR/APPlogo.png'; $table = '<table width="285" border="0" cellpadding="0" cellspacing="10" align="center"><tr>'; //counters $count_td = 1; $count_page = 1; //retrieve data from database $result = mysql_query("SELECT * FROM custombtn"); while($row = mysql_fetch_array($result)){ if($count_td == 4){ //after each 3 data start new row $count_td = 1; $table .= '</tr><tr>'; } if($count_page == 10){ //after each 9 data new page need to be created and 10th data placed on new page--doesnt work $count_page = 1; $table .= '</tr></table><table width="285" border="0" cellpadding="0" cellspacing="10" align="center"><tr>'; $pdf->AddPage('P', 'A5'); } $table .= '<td width="95" align="center"><img src="QR/'.$row['name'].'.png"/> <p style="font-family:Verdana, Geneva, sans-serif; font-size:15px"> Inv.br: <b style="font-size:40px;">'.$count_page.'</b></p> <br><img width="90" height="29" src="'.$logo.'"/></td>'; $count_td++; $count_page++; } $pdf->writeHTML($table, true, false, true, false, ''); $pdf->lastPage(); $pdf->Output('PDFTemplate.pdf', 'I'); ?> I little adjust folders from before (put all to QR), it work when i dont put IF function for new page. So.. i tried with : if($count_page == 10){ //after each 9 data new page need to be created and 10th data placed on new page--doesnt work $count_page = 1; $table .= '</tr></table><table width="285" border="0" cellpadding="0" cellspacing="10" align="center"><tr>'; $pdf->AddPage('P', 'A5'); } and also.... if($count_page == 10){ //after each 9 data new page need to be created and 10th data placed on new page--doesnt work $count_page = 1; $table .= '</tr></table>'; $pdf->AddPage('P', 'A5'); $table .='<table width="285" border="0" cellpadding="0" cellspacing="10" align="center"><tr>'; } but...no effects, code for creating new page after each 9 data and placing next data to new page doesnt work. Sorry for bothering and thanks for helping. Regards
  14. Sorry but this code doesnt work... lots of errors. Code i have gave writes pdf but he puts first page blank and then all data puts on second page.... Think there is something missing here.. Thanks.
  15. Sorry for bothering but am stuck again. Am trying to put on each page 9 datas, but problem is that my <table> is in front of while function(i think thats main problem). $logo ='QRcodovi/APPlogo.png'; $table = '<table border="0" cellpadding="0" cellspacing="10" align="center"><tr>'; $count_td = 1; $count_page = 1; $result = mysql_query("SELECT * FROM custom"); while($row = mysql_fetch_array($result)){ if($count_td == 4){ $count_td = 1; $table .= '</tr><tr>'; } if($count_page == 10){ //after each 9 data new page need to be created and 10th data placed on new page $count_page = 1; $pdf->AddPage('P', 'A5'); } $table .= '<td align="center"><img src="QR/'.$row['name'].'.png"/> <p style="font-family:Verdana, Geneva, sans-serif; font-size:15px"> Inv.br: <b style="font-size:40px;">'.$count_page.'</b></p> // testing counter <br><img width="90" height="29" src="'.$logo.'"/></td>'; $count_td++; $count_page++; } $pdf->writeHTML($table, true, false, true, false, ''); Can it be solved on this way? Thanks.
  16. Dunno did i understood good but don't worry i know how to get my final code. My only problem was TCPDF who is harsh on me all time Thanks for helping man.
  17. Thanks man , you are the best. Now i only need to put to add me new page after 9 datas and put some designs and it will be perfect. Thanks lot man!
  18. Well i make this is PHP : $logo ='QRcodovi/APPlogo.png'; echo '<table border="1" align="center"><tr>'; $count = 1; $result = mysql_query("SELECT * FROM custom"); while($row = mysql_fetch_array($result)){ if($count == 4){ $count = 1; echo '</tr><tr>'; } echo '<td align="center"><img src="QR/'.$row['name'].'.png"/> <p style="font-family:Verdana, Geneva, sans-serif; font-size:15px"> Inv.br: <b style="font-size:40px;">'.$row['name'].'</b></p> <br><img width="90" height="29" src="'.$logo.'"/></td>'; $count++; } But am not sure how to use it in TCPDF with using $pdf->writeHTML($string, true, false, true, false, ''); Any idea?
  19. Yes. I tasted him But i also know that he wont do something in html if tags are not closed. In your example u dont close table? Its like auto close? BTW if you are familiar with TCPDF can u advice me what command should i use for writing html. WriteHTMLCell, WriteHTML or some other maybe? Thanks.
  20. Yes true. Thanks lot for giving me example code. I hope TCPDF wont be harsh and it will exept some version of this code. Thanks man u help me lot.
  21. Hi, thanks for reply.. I ll try it but i think it wont work because i need to implement this code in TCPDF template. Sorry, my bad i didnt put that my problem description.
  22. Hello, can someone help me with my proggraming problem please. Am new in this so i still have lots problems. I need to put all data from my MySQL table in one table in html. There is catch... i need to design output to give me table with x rows and 3 columns, so it means while reading data from database it need put every 4th in new row. And if there isnt 3 data (or better say if there isnt 3 full <td>) in row code will automatically add empty <td> or 2 in table. So...did somebody do this before or have some code ? All i got for now is $td ='<td align="center"><img src="'.$row['name'].'.png" /> <p style="font-family:Verdana, Geneva, sans-serif; font-size:15px"> Number: <b style="font-size:40px;">'.$row['serial'].'</b></p> <br><img width="90" height="29" src="'.$logo.'"/></td>'; $tr ='<tr>'.$td.'</tr>'; $html='<table border="1" align="center">'.$tr.'</table>'; Thanks.
  23. Hi, i have one more question. Can u in procedure make that she merge 2 or more varchar variables in 1? like in php: $a= 'name'; $b= '-name2'; echo $a.$b; thanks
  24. Thanks. i saw that but didnt understand some things..but now after thinking my mind is clear
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.