Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

sayedsohail's Achievements

Advanced Member

Advanced Member (4/5)



  1. well thanks for that, but i got 1.1 to 50.1 than in that case i had to write 50 times (preg_replace("{1.1}",$row[description],$form); ) which is same as using echo and if statement.
  2. this is the output of html table Serial Number Description 1.1 xyz 1.2 2.1 2.1 3.1 3.2 4.1 4.2 so on.
  3. the table structure is: id autoincrement title varchar 10 description varchar 50
  4. yes there is a pattern, titles in sequential order an the description should print against this order. the $row['title'] and $row['descriptiion']. But it is not necessary that data comes in sequential order, therefore i need to use if statment to see if there is any matching titles and than print on specific location row 1 to row 50 so on. 1.1 1.2 1.3 1.4 1.5 2.1 2.2 2.3 2.4 2.5 3.1 3.2 3.3 3.4 3.5 4.1 4.2 4.3 4.4 4.5 Thanks,
  5. thanks the problem is if 1.1 it has to print on row 1 and column 10 on the form. and if 4.1 than it has to print on row 7 and columen 10. I am just struggling to figure out how to achieve this. thanks anyway.
  6. Hi everyone, I had to print decription on a pre-printed form against items in a serial number on a specific postion i.e, Pre-printe form Serial Number Description 1.1 if($row['title']=='1.1'){ echo "$row['description']";} 1.2 if($row['title']=='1.2'){ echo "$row['description']";} 2.1 if($row['title']=='2.1'){ echo "$row['description']";} 2.1 if($row['title']=='2.2'){ echo "$row['description']";} 3.1 if($row['title']=='3.1'){ echo "$row['description']";} 3.2 if($row['title']=='3.2'){ echo "$row['description']";} 4.1 if($row['title']=='4.1'){ echo "$row['description']";} 4.2 if($row['title']=='4.2'){ echo "$row['description']";} Can someone suggest any better method than this. Please advise. Thanks,
  7. Madtechi, My apologies, i just wish to know how to compile or which is the most recommened tool to compile php files. Thanks
  8. I got multiple functions with different name i.e., addnotes, editnotes - not sure how to check existence of this and than remove. Thanks anyway.
  9. i just change button id='task' and addEventListener with click instead of onclick, it works fine. document.getElementById("task").addEventListener("click",updatenotes,false); Unfortunately, if i try to add additional addEventListener to the smae button, results multiple functions attached to the same button. How could i attached only the recent addeventlistener to the button.
  10. well million thanks, this is so far i tried still no SUCCESS: <form id='test'> <input type='name' value=''> <input type='email' value=''> <input type='button' value='New' onclick='addfunction();'>. <input type='submit' value='Update'> </form> // here is the simple function written in javascript which LINKS the function insertnotes() to the submit button, <script> function addfunction() { if (window.attachEvent) { document.getElementById("submit").attachEvent("onclick",insertnotes); } else if (window.addEventListener) { document.getElementById("submit").addEventListener("onclick",insertnotes,true); } } /// This function needs to be linked to the submit button. function insertnotes() { .... } </script>
  11. Hi everyone, I wish to attach a function to a submit button when users click New button. I can assign it directly, but my requirement is to attach on the fly. Here is my form <form id='test'> <input type='name' value=''> <input type='email' value=''> <input type='button' value='New' onclick='assigned function to submit button'>. <input type='submit' value='Update'> </form> // here is the simple function written in javascript which needs to be attached to the submit button, <script> function insertdata() {.....} </script> Can someone suggest how to attach function to your submit button when users clicks the new button. (Offcourse i can assign the function to the submit button directly, but my requirement is attached on the fly). Thanks Sohail
  • 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.