Forum

[SOLVED] Question a...
 
Notifications
Retirer tout

[SOLVED] Question about datefieldbox in object detail

4 Posts
2 Utilisateurs
0 Reactions
3,379 Vu
koorosh
(@keloniton)
Posts: 47
Trusted Member
Début du sujet
 
[#3389]

Hello dear Mr babynus, How are you.
I appreciate if you help me with the following question.
my question concept: I want to add a button undert the regular projeqtor datetextbx in objectdetail. then by clicking that button a window opens and some inputs are taken. the results of inputs will have effect in the datetextbox.
What i did: Then, i need to have the id of datetextbox to assign a value to it. In order to do this, i simply added a button under the

of datetextbox in view/objectdetail.php as follows:
echo '';
Based on line 782 of view/objectdetail the input of processingfunction would be the id of the datetextelement. Then, in view/projecqtor.js i added the following function:
function processingfunction(input) {
dijit.byId(input).set('value','2016-12-12');
}
Logically the date must be dedicated to datetextbox, but it does not work. do you have any idea?
let me appreciate your time and help
thanks in advance


 
Posté : 12/05/2016 3:59 pm
(@babynus)
Posts: 14952
Membre Admin
 

Your code is valid only if $included is set, for instance if you treat some planningElement item.

For other cases, it should be onclick=processingfunction ( " ' . $col . ' ");


 
Posté : 12/05/2016 5:23 pm
koorosh
(@keloniton)
Posts: 47
Trusted Member
Début du sujet
 

Thanks Dear Mr babynus;
I am trying to add a simple button and div in objectdetail.php. The button should be seen and the div should not. then i add following code in objectdetail.php and I set div property to be hidden at the first. When the user clicks on the button, the function testfuntion is run and the div would be shown. the code is as follows:

objectdetail.php:
echo ''; //defining a button
echo '

';

projeqtor.js:
function testfunction(input){
documnet.getElementById("pop").style.display='block'; //setting the div property to BLOCK
}
I tested this in a sample file. It worked. But i do not know why it does not work in projeqtor and the div content is not show. I appreciate to know your idea.
Thank you very much


 
Posté : 15/05/2016 9:13 am
(@babynus)
Posts: 14952
Membre Admin
 

There is a syntax error
documnet.getElementById
and you'd better use
dojo.byId


 
Posté : 15/05/2016 12:11 pm
Share:
Retour en haut