Skip to main content
November 13, 2007
Answered

Showing a Dialog at Startup

  • November 13, 2007
  • 2 replies
  • 578 views
I'm running DW CS3 for Windows. I'm trying to write an extension which will show a dialog at start up. The "Extending Dreamweaver" manual says, "If you place a command file in the Configuration/Startup folder, the command runs as Dreamweaver starts up." I've done that. That code runs. It also says, "You can also show warnings, prompt the user for information, or call the dreamweaver.runCommand() function." Calling dreamweaver.runCommand() doesn't seem to work. I can put the same code in a command that is executed after startup and it works fine, but within my startup command, it seems like Dreamweaver just ignores my calls to runCommand().

Quite specifically, my startup command contains:
alert('before');
dreamweaver.runCommand('myCommand.htm');
alert('alert');

I see the "before" and "after" alerts, but I don't see the dialog defined in myCommand.htm.

Do you have a suggestion?

Thanks,

Leif
This topic has been closed for replies.
Correct answer Newsgroup_User
"leifw" <webforumsuser@macromedia.com> wrote in message
news:fhcnqk$bm2$1@forums.macromedia.com...
> Yeah, thanks for asking. My command does have a form. I tossed a few
> input tags in for good measure. My dialog still doesn't show up.

As a work-around you can change your command to an _onOpen triggered command
by appending _onOpen to the filename,
then set a flag that you the next time to not show the dialog.

2 replies

November 13, 2007
Thanks, Joris.

That's an interesting work around. I'll give it a try.

Leif
Inspiring
November 13, 2007


"leifw" <webforumsuser@macromedia.com> wrote in message
news:fhbdri$fki$1@forums.macromedia.com...
> I'm running DW CS3 for Windows. I'm trying to write an extension which
> will
> show a dialog at start up. The "Extending Dreamweaver" manual says, "If
> you
> place a command file in the Configuration/Startup folder, the command runs
> as
> Dreamweaver starts up." I've done that. That code runs. It also says,
> "You
> can also show warnings, prompt the user for information, or call the
> dreamweaver.runCommand() function." Calling dreamweaver.runCommand()
> doesn't
> seem to work. I can put the same code in a command that is executed after
> startup and it works fine, but within my startup command, it seems like
> Dreamweaver just ignores my calls to runCommand().
>
> Quite specifically, my startup command contains:
> alert('before');
> dreamweaver.runCommand('myCommand.htm');
> alert('alert');
>
> I see the "before" and "after" alerts, but I don't see the dialog defined
> in
> myCommand.htm.
>
> Do you have a suggestion?
>
> Thanks,

Just checking: your dialog command page DOES contain a form, I recall a form
tag in the html file being required to show any dialog at all.

November 13, 2007
Yeah, thanks for asking. My command does have a form. I tossed a few input tags in for good measure. My dialog still doesn't show up.