Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by oshjosh

  1. oshjosh

    Stripslash help please

    I have some ph I have posted below and would like to add the stripslash function to it but dont know where to start function writer($value) { $fp = fopen ($this->filename,"w"); fwrite($fp,$value); fclose($fp); } As ususal all help much appreciated Rob
  2. oshjosh

    Javascript maths to poulate form

    Works like dream.. thanks one last questio I have tried adding it into this and it just disables it.. <script>document.write( (($data[15]*100) / (2.54)) / 100 );</script> Again would like no more than 2 decimal places $data[15] is a cariable replaced by the database Cheers Rob
  3. oshjosh

    Javascript maths to poulate form

    Hi cLFlava Where would I put this in the above? Cheers Rob
  4. oshjosh

    Javascript maths to poulate form

    Hi Anyone (Dave) have one last question, the script above works like a dream however some numbers have 6 decimal places after them, how would I limit this to 2 decimal places? I have tried with some spipets I have seen to do this but it disables the funcyions so I am sure they are not going in...
  5. oshjosh

    Javascript maths to poulate form

    Hi Dave Works superb, when I see a script like this I can see how it works, I am just not advanced enough yet to actually write one on my own. every time I post in this forum I get great help. Cheers Rob
  6. oshjosh

    Javascript maths to poulate form

    Dave You got it I never thought to put the form tags around it :) How would I use this to have 5 radio buttons that are increased by 17% 34% 51% 68% 85% can I load more than one form IE document.forms[0]. document.forms[1]. document.forms[2]. etc? cLFlaVA Can I just change the...
  7. oshjosh

    Javascript maths to poulate form

    Hi Dan Thanks, I used the value 500 as an example to show a figure sorry. I should have said this will be a dynamic page and 500 will be replaced by a value from a database. Hnce the need for some javascript to give some alternative price options. Cheers Rob
  8. oshjosh

    Javascript maths to poulate form

    I need to do some calculations in a form when a form loads so I would think onload is the best way to make this happen? I have tried the following. <BODY onLoad="document.forms[0].Price.value=( ((500) / (100)) * 17 + 500 );"> <input type="radio" value="" checked name="Price"> But it gives an...
  9. oshjosh

    add 2 numbers and force only 2 decimal places

    Dan Thanks once again worked like a dream.. I am learning slowly Cheers Rob
  10. oshjosh

    add 2 numbers and force only 2 decimal places

    Hi Thanks for the replies to my last post, I have another small script problem. I am using the script below to add 2 numbers <script>document.write(24.99+2.99);</script> when I add some numbers such as the ones in the example I get about 12 numbers after the decimal point, how can I force...
  11. oshjosh

    add 2 decimal numbers

    Dan Thank you for the fast response worked a dream Cheers Rob
  12. oshjosh

    add 2 decimal numbers

    Hi I have a small javascript that adds 2 form fields, however when I add decimal numbers it only adds the integers rather than the whole decimal number. Any suggestions greatly welcomed. Script is below. Cheers Rob <script language="JAVASCRIPT"> <!-- function addTWD() {...
  13. oshjosh

    form validation, minimum characters

    Hi, Im pretty new to PHP, however I have a form that submits data to a mysql database, I would like to specify the minimum amount of characters that have entered into one field before the form can be submited, If any one can show me in simple terms I would be very grateful. Cheers Rob
  14. oshjosh

    between 2 values search problem

    works great thanks.. rob..
  15. oshjosh

    between 2 values search problem

    Hi I am using a small cgi program to open a flat data file then go through the results and display only results that are between two values in a field. I have pasted the part of the script that I am using to do this below: The field I am trying to use tha value of is $price, my problem is that...

Part and Inventory Search

Back
Top