bfuchs
asked on
Modify JavaScript code to add a button.
Hi Experts,
I am taking over a datapage designed in Caspio.
The datapage has the following code in a HTML Section.
Now I want to add a button in case of status being "completed" that will open another datapage, similar to what the edit button does above.
How can I accomplish it?
Attached is the PHP file.
Thanks
snvn-report-EE.php
I am taking over a datapage designed in Caspio.
The datapage has the following code in a HTML Section.
<span class="action-[@field:GUID]" style="display:none;"></span>
<script>
$('td[class^="cbResultSetActionCell"] a:nth-of-type(2)').removeClass();
$('td[class^="cbResultSetActionCell"] a:nth-of-type(2)').addClass('btn btn-primary');
if ('[@field:Status]' != 'Completed') {
$('.action-[@field:GUID]').closest('tr').find('td[class^="cbResultSetActionCell"]').append('<a href="./edit-snvn.php?ID=[@field:GUID]" class="btn btn-primary">Edit</a>');
}
</script>
Now I want to add a button in case of status being "completed" that will open another datapage, similar to what the edit button does above.
How can I accomplish it?
Attached is the PHP file.
Thanks
snvn-report-EE.php
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER