# Facing issue with creating a button on the create screen using Atlassian SDK

**URL:** <https://community.developer.atlassian.com/t/facing-issue-with-creating-a-button-on-the-create-screen-using-atlassian-sdk/87565>\
**Category:** Jira Data Center\
**Tags:** plugin-sdk\
**Created:** [January 2, 2025, 2:07pm UTC](https://community.developer.atlassian.com/t/facing-issue-with-creating-a-button-on-the-create-screen-using-atlassian-sdk/87565 "2025-01-02T14:07:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SailenSahoo](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@SailenSahoo](https://community.developer.atlassian.com/u/SailenSahoo)\
**Post date:** [January 2, 2025, 2:07pm UTC](https://community.developer.atlassian.com/t/facing-issue-with-creating-a-button-on-the-create-screen-using-atlassian-sdk/87565/1 "2025-01-02T14:07:05Z")

</div>

I am trying to create a button on the create issue screen using a web resource.

Can anyone help me understand what I am missing or doing wrong ?

I am trying to access the script from the web resource:

AJS.toInit(function() {

```
function addButton() {
    const createIssueDialog = document.querySelector('#create-issue-dialog');
    const descriptionField = document.querySelector('#description');
    if (descriptionField && createIssueDialog) {
        console.log('Description field found');
        const createIssueButton = document.createElement('button');
        createIssueButton.innerHTML = 'Log to console';
        createIssueButton.style.display = 'block';
        createIssueButton.style.marginTop = '10px';
        createIssueButton.style.backgroundColor = 'red';
        createIssueButton.onclick = function() {
            console.log('create issue button clicked');
        };
        descriptionField.parentNode.insertBefore(createIssueButton, descriptionField.nextSibling);
    } else {
        console.log('Description field not found');
    }
}

if (document.querySelector('#create-issue-dialog')) {
    addButton();
}

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {
    if (context.closest('#create-issue-dialog').length) {
        addButton();
    }
});

```

});

---

<div class="post-metadata">

**Author:** ![RajaShekher](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@RajaShekher](https://community.developer.atlassian.com/u/RajaShekher)\
**Post date:** [February 4, 2025, 2:47pm UTC](https://community.developer.atlassian.com/t/facing-issue-with-creating-a-button-on-the-create-screen-using-atlassian-sdk/87565/2 "2025-02-04T14:47:13Z")

</div>

I am facing the same issue. Any idea?
