Jump to content

davocold

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Everything posted by davocold

  1. thanks alot, i used the onclick and it changes the name but only once, if i click another radio button to change it back to the previous name, it doesn't. would the function way of doing this fix it?
  2. thanks, i want the change when a radio button is selected, i mean when i select a radio button i want the name of the pfc_words change to "english". How do i go about doing that? can i use onClick="document.getElementById('pfc_words').name = 'MY_NEW_NAME';" in radio button?
  3. thanks, i think am getting somewhere but what am i doing wrong with the following functions <?php function english() { $('#pfc_words').attr('name', 'english'); } function saisie() { $('#pfc_words').attr('name', 'saisie'); } ?>
  4. Is there a javascript or Jquery code that can change the name "saisie" of the text input to "anothername"?
  5. i need a function that can change the name of an input text. <input type="text" name="saisie" onkeyup="transcrire()" id="pfc_words" title="<?php echo _pfc("Enter your message here"); ?>"maxlength="<?php echo $max_text_len; ?>"/>
  6. Here is the text input box: <input type="text" name="english" onkeyup="transcrire()" id="pfc_words" title="<?php echo _pfc("Enter your message here"); ?>" maxlength="<?php echo $max_text_len; ?>"/> I have the following radio buttons: <input type="radio" name="language" value="" checked onClick="french();"/><label for="language">French </label> <input type="radio" name="language" value="" onClick="english();"/> <label for="language">English </label> i need a function to change the name of the text input "english" depending on the radio button selected. if the first radio button is selected i want the text input name set to "french" and if the second radio button is selected i want text input name set to "english".
  7. how do i replace a specific line in a text file with an array string? example: text content is like this: red,brown,green,black black,green,red,brown green,black,brown,red so if i have $array = "purple,grey,pink,cyan"; how can i use fwrite to replace line 2 in text file which is green,black,brown,red with $array i want to replace the whole line 2 with the arrray string.
  8. this is not working. i think i should try a diffrent aproach. how do i replace a particular line in a text file with an array string? example: text content is like this: red,brown,green,black black,green,red,brown green,black,brown,red so if i have $array = "purple,grey,pink,cyan"; how can i use fwrite to replace line 2 in text file which is green,black,brown,red with $array i want to replace the whole line 2 with the arrray string.
  9. isn't there any way i can dump everything in the array to a text file without adding any extra characters or line breaks?
  10. it works but it is writing some extra chars with the array contents. anyway to clean this up?
  11. how do i declare the $row and $column am not sure about the testfile aswell
  12. $fp = fopen('textfile.txt', 'w'); fwrite($fp, '$myarray'); fclose($fp); array contains: red,brown,green,black black,green,red,brown green,black,brown,red i want to write the arry to the text file exactly as it is.
  13. i think i need the 2d solution but i can not seem to get it right, could u explain it a bit? chears
  14. array contains the following lines: red,brown,green,black black,green,red,brown green,black,brown,red How can i write the whole content of the array to a text file? fwrite($textfile, $array); won't do it
  15. i have the text file text.txt containing the following: john,male,36,libra jane,female,28,cancer stive,male,33,gemini and so on i am able to read each line and edit its contents the edited line is assigned to a variable. what i need is a function that will replace a specific line in the text file with the new variable i tried using fopen, fwrite, fclose but it is deleting everything in the text file. i have a loop that ammends each line and i would like to include a write function in it. Thanks,
×
×
  • 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.