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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: oshjosh
  • Order by date
  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...
  16. oshjosh

    for each statement help needed

    Back quicker than I expected..:) I know in regular perl how to do an &quot;else if statement&quot;, however this type of perl is new to me. Some of my listings do not have an artist so in the results from this program I get a table at the top with these listed. These are special offers and I...
  17. oshjosh

    for each statement help needed

    That fixed.. Thanks to one and all and a very big thank you to Charles & justice When my knowledge is sufficient I will be back to share it in the mean time I will probably be back picking everyones brains.. Cheers Rob
  18. oshjosh

    for each statement help needed

    Thanks Charles Added the extra line calling CGI PM and still getting the same error. I do have telnet access but my knowledege is very limited and do not know how to run from the command line. Any suggestions welcomed..:) Thanks Rob
  19. oshjosh

    for each statement help needed

    You didn't make me feel Dumb,:-) I never read your initial post properly. I did some research today and worked out that the subroutines can go at the end and below is my latest try.. I am still getting the following error: Execution of ./allnew.cgi aborted due to compilation errors...
  20. oshjosh

    for each statement help needed

    Charles, Now I do feel Dumb.. sorry I dont know where to put the subroutines!! When I used strict it gave me the compilation error.. without strict it gave me the blank page.. and I dont know how to run from the command line.. Maybe I should change from a techical user..:) Cheers Rob

Part and Inventory Search

Back
Top