[SOLVED] Â Another Confirmation box question |
9/16/2010 11:09:09 PM |
PHPRunner General questions | |
P
procheck author
This script has been mentioned in many posts and it works fine: |
|
![]() |
Sergey Kornilov admin 9/17/2010 |
You cannot use BeforeEdit event for this purpose as this check needs to be done before submit. |
P
|
procheck author 9/24/2010 |
You cannot use BeforeEdit event for this purpose as this check needs to be done before submit. The only way to do this is to track field changes in Javascript and popup confirmation box if required. This will require quite a bit of custom Javascript coding. Here is the article that explains how to track form changes in Javascript: http://www.codestore.net/store.nsf/unid/DOMM-4UTKE6 You'll need to modify it to take into account just a few fields.
|
A
|
ann 9/28/2010 |
Al, |
P
|
procheck author 9/28/2010 |
Al, the only way to save the data is to fill some fields with them.
|
![]() |
Sergey Kornilov admin 9/29/2010 |
Al, |
P
|
procheck author 10/3/2010 |
I've never used $_REQUEST. My understanding is that $_REQUEST['myfield'] would be populated when the form is submitted (method=post). I've tried displaying it in PHPRunner but there is nothing there. Same with $_POST. Also used a debugger to display it but there was nothing populated. I tried populating (document.forms.editform1.myfield.value= 'something') but this field does not exist. This one does - document.forms.editform1.value_Goaltenders_1.value but it did not work. Any suggestions would be appreciated. |
P
|
procheck author 10/4/2010 |
I was just thinking that since I intercept the submit statement, is it possible that the super global variables are not being populated because I am not actually submitting the form? |
![]() |
Sergey Kornilov admin 10/4/2010 |
I'm not really sure what's the purpose of implementing your own data saving routine if PHPRunner does this for you. Don't try to break what works already. <INPUT class=button onclick="if (!isFormChanged()) window.location.href='hockeypool_info_list.php?a=return';return false;" value=Save type=submit> |
P
|
procheck author 10/4/2010 |
It's not that I want to implement a new save routine. I just can't get the data to save within PHPRunner so I was just trying an alternative. The data change is detected correctly in the javascript, but when I return the data is not saved. Your suggestion was something which I've already tried and it returns to the edit screen with the new data still showing but if I click on "back to list", the old data is displayed. I also verify that this is in the table. If this is not possible in PHPRunner then I will just change what I am trying to do. Sounds like it might be possible using Ajax but I will have to learn that at a later date. |
P
|
procheck author 10/4/2010 |
Well sometimes it's good to be stubborn. I now have it working! I looked at one of your other posts and combined it with the other methods. |
P
|
procheck author 10/5/2010 |
I decided to just go ahead and post the solution. |