• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Change story after button click

Participant ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Hi

I need to change story contents inside onClick button

closeBtn.onClick = function() {

  var stories =  getStories(app.selection); // get all selection stories

  for (var i = 0; i < stories.length; i++) {

      var abc = stories.contents = 'fsdfdsfdsfs';

  }

    artDialog.close();

  }

Thanks

TOPICS
Scripting

Views

316

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Apr 21, 2017 Apr 21, 2017

Hi Robert,

This topic has been dealt like a zillion times over the forum. You are (probably) using a modal dialog. So you can't have any access to the DOM BEFORE you closed the dialog.

closeBtn.onClick = function() {

//checking if you can go further

if ( everythingisGood ) {

artDialog.close(1);

}

     

  }

if ( win.show() == 1 ) //call code

Votes

Translate

Translate
People's Champ ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Hi Robert,

This topic has been dealt like a zillion times over the forum. You are (probably) using a modal dialog. So you can't have any access to the DOM BEFORE you closed the dialog.

closeBtn.onClick = function() {

//checking if you can go further

if ( everythingisGood ) {

artDialog.close(1);

}

     

  }

if ( win.show() == 1 ) //call code

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

LATEST

Thank you very much

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines