Jump to content

djbuddhi

Members
  • Posts

    153
  • Joined

  • Last visited

    Never

Everything posted by djbuddhi

  1. i want to export mysql query data to a excel file while on the web ?how to do it ?
  2. I want to execute a sql and get a result set and written to a text file with the reaming query data like a spread sheet ,how 2 do it .text file written part is confused .pls help me
  3. u can restrict by right click on the browser or u can restrict the print screen button both at the same time using a java script .u can protect them anyway ;D
  4. upload files , and view something like that
  5. I need a simple Document Management system ? From where can i download it /php and mysql
  6. i need a javascript to check whether this at least one check box is clicked or not <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>-- UNION ASSURANCE </title> <link href="bud.css" rel="stylesheet" type="text/css"> <script language="javascript"> var noOfSubmits = 0; function CheckAll() { count = document.form1.elements.length; for (i=0; i < count; i++) { if(document.form1.elements.checked == 1) {document.form1.elements.checked = 0; } else {document.form1.elements.checked = 1;} } } function initForm() { noOfSubmits = 0; } function validate_form() { if(document.getElementsByName("items[]").checked) { alert("checked"); } else { alert("unchecked"); } } function formValid_place() { var agree=confirm("Are you sure you wish to continue?"); if (agree) { // count_check = document.form1.elements.length; //for (i=0; i<document.form1.d.length; i++){ //if (document.form1.d.checked==true) //alert("Checkbox at index "+i+" is checked!") //} //return false; //} } noOfSubmits++; if(noOfSubmits>1) { alert("Submission already done. Please wait...."); return false; } document.form1.submit(); }else{ return false; } return (true); } </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <body onLoad="initForm();"> <br><br><br><br> <form name="form1" method="post" action="" onSubmit="return formValid_place()"> <br><div align="center"> <table width="88%" align="center" class="adminlist"> <tr> <th height="25" colspan="2"> <div align="left">Company Information</div></th> </tr> <tr class="row0"> <td width="30%" align="right"> <em>Company Name</em> : </td> <td width="70%">xcxczxc</td> </tr> <tr class="row1"> <td align="right"><em>Address 1 </em>: </td> <td width="70%">No-90 Galle Road</td> </tr> <tr class="row0"> <td align="right"><em>Address 2 : </em></td> <td>Panadura</td> </tr> <tr class="row1"> <td align="right"><em>City : </em></td> <td width="70%">Panadura</td> </tr> </table></div> <br><br><br><br><div align="center"> <table width="91%" align="center" cellpadding="0" cellspacing="0" class="adminlist"> <tr> <th height="25" colspan="6"> <div align="left">Mark Payments for Participating Employees </div></th> <th height="25" colspan="2"><input name="btn" type="button" onclick="CheckAll()" value="Check All"> </th> </tr> <tr class="row1"> <td width="13%" height="27" nowrap="nowrap" ><strong><DIV align="right">Policy Number</div> </strong></td> <td width="17%" nowrap="nowrap" ><strong>Employee Name</strong></td> <td width="21%" nowrap="nowrap" ><strong>Department</strong></td> <td width="11%" nowrap="nowrap" ><strong>Policy State</strong></td> <td width="8%" nowrap="nowrap" ><div align="right"><strong> Premium Amount</strong></div></td> <td width="8%" nowrap="nowrap" ><strong>No of Days From Last Payment</strong></td> <td width="14%" nowrap="nowrap" ><strong>Last Payment</strong></td> <td width="8%" nowrap="nowrap" ><strong>Payment</strong></td> </tr> <tr class="row1" onmouseout="javascript:style.backgroundColor=''"onmouseover="javascript:style.backgroundColor='#F6F9ED'"> <td nowrap="nowrap"><div align="right"> 45353</div></td> <td nowrap="nowrap">Mr vxcv c</td> <td nowrap="nowrap"></td> <td nowrap="nowrap"><font color="#333333">Active</b></font></font></td> <td nowrap="nowrap"><div align="right"> 185.00</div></td> <td nowrap="nowrap"><div align="right">0</div></td> <td nowrap="nowrap">12 / 06 / 2008</td> <td nowrap="nowrap"><div align="center"><input type="checkbox" name="d1" class="detailedViewTextBoxsmall" onFocus="this.className='detailedViewTextBoxOnsmall'" onBlur="this.className='detailedViewTextBoxsmall'" value="45353" /></div></td> </tr> <tr class="row0" onmouseout="javascript:style.backgroundColor=''"onmouseover="javascript:style.backgroundColor='#F6F9ED'"> <td nowrap="nowrap"><div align="right"> 64563</div></td> <td nowrap="nowrap">Mr Mr.S.De Wijesekera</td> <td nowrap="nowrap"></td> <td nowrap="nowrap"><font color="#333333">Active</b></font></font></td> <td nowrap="nowrap"><div align="right"> 465.00</div></td> <td nowrap="nowrap"><div align="right">0</div></td> <td nowrap="nowrap">12 / 06 / 2008</td> <td nowrap="nowrap"><div align="center"><input type="checkbox" name="d2" class="detailedViewTextBoxsmall" onFocus="this.className='detailedViewTextBoxOnsmall'" onBlur="this.className='detailedViewTextBoxsmall'" value="64563" /></div></td> </tr> <tr class="row1" onmouseout="javascript:style.backgroundColor=''"onmouseover="javascript:style.backgroundColor='#F6F9ED'"> <td nowrap="nowrap"><div align="right"> 44444</div></td> <td nowrap="nowrap">Mr Mr.S.De Mr.S.De Silva Wijesekera</td> <td nowrap="nowrap"></td> <td nowrap="nowrap"><font color="#333333">Active</b></font></font></td> <td nowrap="nowrap"><div align="right"> 465.00</div></td> <td nowrap="nowrap"><div align="right">0</div></td> <td nowrap="nowrap">12 / 06 / 2008</td> <td nowrap="nowrap"><div align="center"><input type="checkbox" name="d3" class="detailedViewTextBoxsmall" onFocus="this.className='detailedViewTextBoxOnsmall'" onBlur="this.className='detailedViewTextBoxsmall'" value="44444" /></div></td> </tr> <tr class="row0" onmouseout="javascript:style.backgroundColor=''"onmouseover="javascript:style.backgroundColor='#F6F9ED'"> <td nowrap="nowrap"><div align="right"> 32342</div></td> <td nowrap="nowrap">Mr Mr. S. Gunawardena</td> <td nowrap="nowrap"></td> <td nowrap="nowrap"><font color="#333333">Active</b></font></font></td> <td nowrap="nowrap"><div align="right"> 370.00</div></td> <td nowrap="nowrap"><div align="right">0</div></td> <td nowrap="nowrap">12 / 06 / 2008</td> <td nowrap="nowrap"><div align="center"><input type="checkbox" name="d4" class="detailedViewTextBoxsmall" onFocus="this.className='detailedViewTextBoxOnsmall'" onBlur="this.className='detailedViewTextBoxsmall'" value="32342" /></div></td> </tr> <tr class="row1" onmouseout="javascript:style.backgroundColor=''"onmouseover="javascript:style.backgroundColor='#F6F9ED'"> <td nowrap="nowrap"><div align="right"> 53453</div></td> <td nowrap="nowrap">Mr Mr. S. Gunawardena</td> <td nowrap="nowrap"></td> <td nowrap="nowrap"><font color="#333333">Active</b></font></font></td> <td nowrap="nowrap"><div align="right"> 375.00</div></td> <td nowrap="nowrap"><div align="right">0</div></td> <td nowrap="nowrap">12 / 06 / 2008</td> <td nowrap="nowrap"><div align="center"><input type="checkbox" name="d5" class="detailedViewTextBoxsmall" onFocus="this.className='detailedViewTextBoxOnsmall'" onBlur="this.className='detailedViewTextBoxsmall'" value="53453" /></div></td> </tr> <tr class="row0" onmouseout="javascript:style.backgroundColor=''"onmouseover="javascript:style.backgroundColor='#F6F9ED'"> <td nowrap="nowrap"><div align="right"> 03423</div></td> <td nowrap="nowrap">Mr Mr. S. Gunawardena</td> <td nowrap="nowrap"></td> <td nowrap="nowrap"><font color="#333333">Active</b></font></font></td> <td nowrap="nowrap"><div align="right"> 560.00</div></td> <td nowrap="nowrap"><div align="right">0</div></td> <td nowrap="nowrap">12 / 06 / 2008</td> <td nowrap="nowrap"><div align="center"><input type="checkbox" name="d6" class="detailedViewTextBoxsmall" onFocus="this.className='detailedViewTextBoxOnsmall'" onBlur="this.className='detailedViewTextBoxsmall'" value="3423" /></div></td> </tr> <tr class="row1" onmouseout="javascript:style.backgroundColor=''"onmouseover="javascript:style.backgroundColor='#F6F9ED'"> <td nowrap="nowrap"><div align="right"> 00003</div></td> <td nowrap="nowrap">Mr xcv cxvx</td> <td nowrap="nowrap"></td> <td nowrap="nowrap"><font color="#333333">Active</b></font></font></td> <td nowrap="nowrap"><div align="right"> 465.00</div></td> <td nowrap="nowrap"><div align="right">0</div></td> <td nowrap="nowrap">12 / 06 / 2008</td> <td nowrap="nowrap"><div align="center"><input type="checkbox" name="d7" class="detailedViewTextBoxsmall" onFocus="this.className='detailedViewTextBoxOnsmall'" onBlur="this.className='detailedViewTextBoxsmall'" value="3" /></div></td> </tr> <tr class="row0" onmouseout="javascript:style.backgroundColor=''"onmouseover="javascript:style.backgroundColor='#F6F9ED'"> <td nowrap="nowrap"><div align="right"> 02142</div></td> <td nowrap="nowrap">Mr p.n.r ranasinhe</td> <td nowrap="nowrap"></td> <td nowrap="nowrap"><font color="#333333">Active</b></font></font></td> <td nowrap="nowrap"><div align="right"> 945.00</div></td> <td nowrap="nowrap"><div align="right">0</div></td> <td nowrap="nowrap">12 / 06 / 2008</td> <td nowrap="nowrap"><div align="center"><input type="checkbox" name="d8" class="detailedViewTextBoxsmall" onFocus="this.className='detailedViewTextBoxOnsmall'" onBlur="this.className='detailedViewTextBoxsmall'" value="2142" /></div></td> </tr> <tr class="row1" onmouseout="javascript:style.backgroundColor=''"onmouseover="javascript:style.backgroundColor='#F6F9ED'"> <td nowrap="nowrap"><div align="right"> 56456</div></td> <td nowrap="nowrap">Mrs zzx ZZX</td> <td nowrap="nowrap"></td> <td nowrap="nowrap"><font color="#333333">Active</b></font></font></td> <td nowrap="nowrap"><div align="right"> 2,545.00</div></td> <td nowrap="nowrap"><div align="right">0</div></td> <td nowrap="nowrap">12 / 06 / 2008</td> <td nowrap="nowrap"><div align="center"><input type="checkbox" name="d9" class="detailedViewTextBoxsmall" onFocus="this.className='detailedViewTextBoxOnsmall'" onBlur="this.className='detailedViewTextBoxsmall'" value="56456" /></div></td> </tr> <TR class="row0"> <td ></td> <td ></td> <td ></td> <td ><b>Total (Rs.) :</b></td> <td ><div align="right"><b>6,375.00</b></div></td> <td > </td> <td ></td> <td ></td> </TR> </table> </div> <br> </p> <br> <div align="center"> <input type="button" name="Submit32" value="Back" style="width:70px; height:22px " class="mainoption" onClick="location.replace('add_mark_payments.php');"> <input type="submit" name="mark" id="mark" value="Mark" style="width:70px; height:22px " class="mainoption" > </div></form> </body> </html>
  7. i need a javascript for soll table heading [ html table heading when scroll down the mouse] pls help
  8. cant this table create dynamically.i need a code like this
  9. How can i use php emailer to send mysql query list ex: name age salary a 11 22 b 33 44 c 33 44 d 33 88 e 67 88 this table is creating dynamically buy a sql query .i want 2 send this above table by php mailer how to do it ?
  10. How to get the last date of the month or how to get the previous month in mysql
  11. i have the solution now ,some how i manage 2 escape ;D ;D
  12. html page <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <script language="javascript" src="ajax.js"> </script> <body> <form name="form1" method="post" action=""> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> <input name="r1" id="r1" type="radio" value="1"> <input name="r1" id="r1" type="radio" value="2"> <input name="r1" id="r1" type="radio" value="3"> <input name="r1" id="r1" type="radio" value="4"> </p> <p> </p> <p> </p> <p><div id="diveInfo"></div> <input type="button" name="Button" value="Button" onClick="ajaxFunction();"> </p> </form> </body> </html> ajax.js code function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert("Your browser broke..!Pls Try Again ...!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ var ajaxDisplay = document.getElementById('diveInfo'); ajaxDisplay.innerHTML = ajaxRequest.responseText; } } var mysearchtxt = document.getElementById("r1").value; var queryString = "?seachtxt="+mysearchtxt; ajaxRequest.open("GET", "1.php" + queryString, true); ajaxRequest.send(null); } 1.php <?php echo $_GET['seachtxt']; ?> can u tell me why this value alway 1 when clicking every radio button
  13. it was not there , i was checking this
  14. Can anyone give me AJAX/php code sample of validating email address , checking username exists , on client side onchange event validation .
  15. ooh .thanks at the same time how do u post this smiles to the editor
  16. i just want to develop a web based text editor ,to that i need to load the font list from a combo box .if the user select a particular font , all the information type by the user will be receive according to that font . pls tell me how to load the font list by php basically its like a gui where u can see this kind of a layout ,when u tring to create a new topic in this site
  17. can u show me an example ? how 2 do it
  18. i want to execute a function with ajax ,that part is successfully working .at the same time i want to display some figures in a table in the main page .my question is how to execute the html table coding with the above calculation with the same time in the main page with php/ajax any clue ?
  19. where to put the function in ajax file can mention the place where the function going 2 put //Browser Support Code var noOfSubmits = 0; function initForm() { noOfSubmits = 0; } function dome() { noOfSubmits = 0; } function clear_data(){ document.getElementById("title").value=0; document.getElementById("surname").value=""; document.getElementById("initials").value=""; document.getElementById("name_d_inintials").value=""; document.getElementById("nic_no").value=""; document.getElementById("FrmDate").value=""; document.getElementById("comp_usb_div").value=""; document.getElementById("emp_no").value=""; document.getElementById("add_1").value=""; document.getElementById("add_2").value=""; document.getElementById("town_city").value=""; document.getElementById("province").value=""; if (document.getElementById("chkagree").checked ){ document.getElementById("chkagree").checked = false; document.getElementById('row11').style.display="none"; document.getElementById('row12').style.display="none"; document.getElementById('row13').style.display="none"; } document.getElementById("mob_no").value=""; document.getElementById("office_telno").value=""; document.getElementById("res_tel_no").value=""; document.getElementById("email_add").value=""; } function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert(" Your browser Broke ..!Pls Try Again ...!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ var ajaxDisplay = document.getElementById('div_Add_emp_info'); ajaxDisplay.innerHTML = ajaxRequest.responseText; } } var com_tbl_id= document.getElementById("hdd_comp_id").value; var title=document.getElementById("title").value; var surname= document.getElementById("surname").value; var inintials= document.getElementById("initials").value; var name_d_initials= document.getElementById("name_d_inintials").value; var nic_no= document.getElementById("nic_no").value; var date_of_birth= document.getElementById("FrmDate").value; var sub_com_name=document.getElementById("comp_usb_div").value; var emp_no = document.getElementById("emp_no").value; var address_1= document.getElementById("add_1").value; var address_2= document.getElementById("add_2").value; var tow_city= document.getElementById("town_city").value; var province= document.getElementById("province").value; var agree= document.getElementById("chkagree").value; var new_add_1= document.getElementById("new_add_1").value; var new_add_2= document.getElementById("new_add_2").value; var new_town_city= document.getElementById("new_town_city").value; var mob_no= document.getElementById("mob_no").value; var office_telno= document.getElementById("office_telno").value; var res_telno= document.getElementById("res_tel_no").value; var emailno= document.getElementById("email_add").value; noOfSubmits++; if(noOfSubmits>1) { alert("Submission already done. Please wait while system is updating..!"); return false; } else{ emailno //var queryString = "?setle_agent_name="+settle_argent +"&set_address="+set_address+"&set_ag_telno="+set_telno +"&set_ag_fax_no="+set_faxno +"&set_ag_email_no="+set_email +"&set_ag_web="+set_web; var queryString = "?surname="+surname +"&comp_tblid="+com_tbl_id+"&initilas="+inintials +"&p_title="+title + "&name_denote_by_initials="+name_d_initials +"&NIC_NO="+nic_no +"&DOb="+date_of_birth +"&sub_com_name="+sub_com_name +"&p_emp_no="+emp_no +"&adress1="+address_1 +"&adress2="+address_2 + "&towncity="+tow_city + "&province="+province + "&my_agree="+agree + "&new_address1="+new_add_1 + "&new_address2="+new_add_2 + "&new_town_city="+new_town_city + "&office_telno="+office_telno + "&mob_no="+mob_no + "&residance_telno="+res_telno + "&email="+emailno; ajaxRequest.open("GET", "ajax_add_employee_infor.php" + queryString, true); ajaxRequest.send(null); clear_data(); } }
  20. filed by filed i think validate by separately is better how 3 do it .need sample code
  21. hey thanks .this is alright , let say u have another two fileds how do u validate like this . lets say u have zipcode filed, how do u change the js file as according my question .this is where i get stuick
  22. thanks guys for the support and it really works .thanks to all the people who support me here my calculation code include_once'./../include/connection_db.php'; include_once'./../include/my_para_list.php'; $category=$_GET['sum_insured']; $srcctc_option=$_GET['srcctc']; $ndc_amount=$_GET['ndcamount']; //echo "dd". $pol_type=$_GET['poloption']; //print"<br>"; $tot_premium=0; $ind_charge=0; $ndc_charge=0; $in_plus_fam_tot=0; $in_plus_fam_parent_tot=0; $in_plus_parent_tot=0; $srcctcc_charge=0; $result = mysql_query("SELECT * FROM policy_option WHERE pol_op_state='A' AND pol_op_sum_assured=$category"); while ($row = mysql_fetch_assoc($result)) { $indvidual = $row['pol_op_individual']; $ind_p_or_family = $row['pol_op_ind_plus_p_or_family']; $ind_p_family = $row['pol_op_ind_plus_p_plus_family']; $ndc = $row['pol_op_natural_death_cover']; $opsrsctc = $row['pol_op_srcc_tc']; } if ($pol_type==1) { $ind_charge=$ind_charge+$indvidual;} else{$ind_charge=0;} if ($pol_type==2) { $in_plus_fam_tot=$in_plus_fam_tot+$ind_p_or_family;} else{$in_plus_fam_tot=0;} if ($pol_type==3) { $in_plus_parent_tot=$in_plus_parent_tot+$ind_p_or_family;} else{$in_plus_parent_tot=0;} if ($pol_type==4) { $in_plus_fam_parent_tot=$in_plus_fam_parent_tot+$ind_p_family;} else{$in_plus_fam_parent_tot=0;} if ($ndc_amount==1) { $ndc_charge=$ndc_charge+$ndc;} else{$ndc_charge=0;} if ($srcctc_option==1) { $srcctcc_charge=$srcctcc_charge+$opsrsctc;} else{$srcctcc_charge=0;} $tot_premium=$tot_premium+$ind_charge+$in_plus_fam_tot+$in_plus_parent_tot+$in_plus_fam_parent_tot+$ndc_charge+$srcctcc_charge; echo number_format($tot_premium,2 );
  23. yes i am using php and with mysql .what will be the problem here is the full code //Browser Support Code function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert("Your browser broke..!Pls Try Again ...!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ var ajaxDisplay = document.getElementById('diveInfo'); ajaxDisplay.innerHTML = ajaxRequest.responseText; document.getElementById('result').value = xmlHttp.responseText;// } } var txtsum_inssured= document.getElementById("sumasssured").value; var txtsrcctc = document.getElementById("srcctc").value; var txtndc = document.getElementById("ndc").value; var txtradio = document.getElementById("poloption").value; if(txtsum_inssured ==0) { alert("Select the Sum Insured Amount from the List ..!"); document.getElementById("sumasssured").focus(); return false;} else{ // var queryString = "?server_agent_name="+server_argent +"&set_address="+set_address+"&set_ag_telno="+set_telno +"&set_ag_fax_no="+set_faxno +"&set_ag_email_no="+set_email +"&set_upid="+tbl_my_id +"&prev_ag_name="+pre_ag_name +"&prev_ag_add="+pre_adddress +"&prev_ag_telno="+pre_telno +"&prev_ag_faxno="+pre_faxno +"&prev_ag_email="+pre_email_no +"&prev_set_agid="+pre_setagent_id +"&prev_town_id="+pre_townid +"&new_setle_id="+new_setid +"&new_town_id="+new_townid ; var queryString = "?sum_insured="+txtsum_inssured +"&srcctc="+txtsrcctc+"&ndcamount="+txtndc +"&poloption="+txtradio; ajaxRequest.open("GET", "script/ajax_get_policy_infor.php" + queryString, true); ajaxRequest.send(null); } }
  24. value was not displaying something else some kind of a html source was displaying...
×
×
  • 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.