First of all, sorry for my english and thanks for your help. I'm gonna try to explain my problem:
The action property of my form is a link to the page where my form is.
Page: controlPanel.php
I test if the user click on the button with this kind of code:
How can i do if i want to use the "save button" of the fck editor in place of my form button?
In other words, how to detect in php that the user has clicked on the "save button" of the fck editor?
Thanks a lot for your answer
Jef (from Belgium)
The action property of my form is a link to the page where my form is.
Page: controlPanel.php
<form id="form1" name="form1" method="post" action="controlPanel.php"> <?php $oFCKeditor = new FCKeditor('content') ; $oFCKeditor->BasePath = '/FCKeditor/'; $oFCKeditor->Value = $row_content[$item]; $oFCKeditor->Create() ; ?> <br> <input type="submit" name="Submit" value="Mise à jour" />
I test if the user click on the button with this kind of code:
if (isset($_POST['Submit'])) { // here is the code of the update of the data in the database }
How can i do if i want to use the "save button" of the fck editor in place of my form button?
In other words, how to detect in php that the user has clicked on the "save button" of the fck editor?
Thanks a lot for your answer
Jef (from Belgium)
Re: [PHP] How to detect click on save button
I have your problem like that. but i use ASP.NET. i need to use the save button to save the data imported from user at database.
If u can find what to do, please help me.
abbas.khodaeian@gmail.com
thanks for ur help.
Re: [PHP] How to detect click on save button
// called on save
function doSave(){
alert('Saved.');
document.getElementById('someElement').innerHTML = 'Saved!';
return false; //this disables default action (submitting the form)
}
// called when FCKeditor is done starting..
function FCKeditor_OnComplete( editorInstance ){
editorInstance.LinkedField.form.onsubmit = doSave;
}