Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [FCK] FCK Editor jak pobrac aktualną wartość za pomocą JS
stachuf11
post
Post #1





Grupa: Zarejestrowani
Postów: 154
Pomógł: 1
Dołączył: 24.04.2006

Ostrzeżenie: (0%)
-----


witam
Jak pobrac aktualną wartość z pola ktore jest jako tiny_mce lub fck i przed chwila cos tam napisalismy?
Stachu

Ten post edytował stachuf11 24.06.2008, 23:20:07
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Fantazyn
post
Post #2





Grupa: Zarejestrowani
Postów: 135
Pomógł: 38
Dołączył: 24.02.2007
Skąd: Warszawa

Ostrzeżenie: (10%)
X----


  1. <form action="index.php" method="post">
  2. <script type="text/javascript">
  3.  
  4. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
  5.  
  6. var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
  7. oFCKeditor.BasePath = sBasePath ;
  8. oFCKeditor.Height = 300 ;
  9. oFCKeditor.Value = 'Pole edycji' ;
  10. oFCKeditor.Create() ;
  11.  
  12. <input type="submit" name="wyslij" value="Zapisz">
  13. </form>


W zmiennej FCKeditor1 jest zapisana treść pola edycyjnego. W PHP odczytałbyś to jako:
  1. <?php //index.php
  2. if (isset($_POST['FCKeditor1'])) echo $_POST['FCKeditor1']));
  3. ?>
  4.  
  5. <form action="index.php" method="post">
  6. <script type="text/javascript">
  7.  
  8. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
  9.  
  10. var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
  11. oFCKeditor.BasePath = sBasePath ;
  12. oFCKeditor.Height = 300 ;
  13. oFCKeditor.Value = 'Pole edycji' ;
  14. oFCKeditor.Create() ;
  15. </script>
  16.  
  17. <input type="submit" name="wyslij" value="Zapisz">
  18. </form>


Ten post edytował Fantazyn 25.06.2008, 10:15:38
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 4.10.2025 - 00:47