Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread How to open a new form in EWB
Sun, Apr 8 2012 9:32 PMPermanent Link

Jan Ferguson

Data Software Solutions, Inc.

Team Elevate Team Elevate

Hey all,

I'm still very much a web-development neophyte. Any assistance would be
appreciated...

I am creating a "test" project which resembles a current client's web
site. I want to open a new form (a "Services" page of the web site) but
cannot for the life of me find the right code. I have searched all the
EWB newsgroups but couldn't find anything either.

In Delphi I would be using frmServices.ShowModal -or- frmServices.Show,
but obviously that won't work in web development. Can someone guide me
in the right direction?

Thanks in advance...
--
Jan Ferguson
Mon, Apr 9 2012 8:47 AMPermanent Link

Raul

Team Elevate Team Elevate

Actually you can do just that : frmServices.ShowModal or
frmServices.Show both are valid.

Depending on how you want the interface to be you can also hide the
original form (or resize the new form so it fully covers the other one).

EWB is based on object pascal laguage and does the heavy lifting of
figuring out what the form.show really means in javascript so you won't
have to.

Raul


On 4/8/2012 9:32 PM, J. Ferguson wrote:
> Hey all,
>
> I'm still very much a web-development neophyte. Any assistance would be
> appreciated...
>
> I am creating a "test" project which resembles a current client's web
> site. I want to open a new form (a "Services" page of the web site) but
> cannot for the life of me find the right code. I have searched all the
> EWB newsgroups but couldn't find anything either.
>
> In Delphi I would be using frmServices.ShowModal -or- frmServices.Show,
> but obviously that won't work in web development. Can someone guide me
> in the right direction?
>
> Thanks in advance...
Mon, Apr 9 2012 8:52 AMPermanent Link

Jan Ferguson

Data Software Solutions, Inc.

Team Elevate Team Elevate

Thanks Raul...

Yup, you're 100% correct. I am not used to some of the error messages
in the compiler. When it told me the variable, function, etc. could not
be found I never thought about the fact that I was missing the form's
name in the Uses clause. DUH!! I guess I'm also spoiled when Delphi
tells you that you missed it.

Thanks for confirming that it could be done.
--
Jan



Raul wrote:

> Actually you can do just that : frmServices.ShowModal or
> frmServices.Show both are valid.
Mon, Apr 9 2012 2:10 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jan,

<< Yup, you're 100% correct. I am not used to some of the error messages in
the compiler. When it told me the variable, function, etc. could not be
found I never thought about the fact that I was missing the form's name in
the Uses clause. DUH!! I guess I'm also spoiled when Delphi tells you that
you missed it. >>

The compiler hints are still very basic, but will slowly improve over time.
One of the first items is the "missing unit in the uses clause" issue, which
is actually just a general "you've got an variable reference that is in a
unit that isn't in your uses clause". Smile

--
Tim Young
Elevate Software
www.elevatesoft.com
Mon, Apr 9 2012 2:38 PMPermanent Link

Jan Ferguson

Data Software Solutions, Inc.

Team Elevate Team Elevate

Tim,

Yup, I realize that. I had never received any error messages on the
very minimal projects I was playing with. This project is actually
going to be a full-fledged website, replacing the one written using a
template. Therefore I am doing things I had never done before in EWB.

I'm happy to say that things are coming out really nice. I just wish
there was a way to bring up another web page (same domain) using a
TButton and code instead of the TLink. The TLink is nice but there is
one button I need to use to do this in order to keep things consistent.
--
Jan



Tim Young [Elevate Software] wrote:

> Jan,

> The compiler hints are still very basic, but will slowly improve over
> time. One of the first items is the "missing unit in the uses clause"
> issue, which is actually just a general "you've got an variable
> reference that is in a unit that isn't in your uses clause". Smile

Tim
Wed, Apr 11 2012 12:08 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jan,

<< Yup, I realize that. I had never received any error messages on the very
minimal projects I was playing with. This project is actually going to be a
full-fledged website, replacing the one written using a template. Therefore
I am doing things I had never done before in EWB. >>

Be sure to check out the TPage component in the final release.  You'll be
able to embed HTML docs in your EWB application, therefore your EWB
application becomes the "shell" or "template", while the HTML docs are your
"content".

<< I'm happy to say that things are coming out really nice. I just wish
there was a way to bring up another web page (same domain) using a TButton
and code instead of the TLink. The TLink is nice but there is one button I
need to use to do this in order to keep things consistent. >>

Remember, the WebDOM unit contains most of the functionality in modern web
browsers, so you can do this:

procedure TTestForm.NavigateButtonClick(Sender: TObject);
begin
  window.location.href:='http://www.mydomain.com/mydocument.html';
end;

to navigate to a new URL programmatically.  However, please keep in mind
that doing so will unload the current EWB application.

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, Apr 11 2012 1:35 PMPermanent Link

Jan Ferguson

Data Software Solutions, Inc.

Team Elevate Team Elevate

Tim,

> Be sure to check out the TPage component in the final release.
> You'll be able to embed HTML docs in your EWB application, therefore
> your EWB application becomes the "shell" or "template", while the
> HTML docs are your "content".

Cool!

> Remember, the WebDOM unit contains most of the functionality in
> modern web browsers, so you can do this:
>
> procedure TTestForm.NavigateButtonClick(Sender: TObject);
> begin
>   window.location.href:='http://www.mydomain.com/mydocument.html';
> end;
>
> to navigate to a new URL programmatically.  However, please keep in
> mind that doing so will unload the current EWB application.

Good information. Thanks for the insight. I worked around it actually
by creating a new page and on that page I placed several TLinks which
created what I wanted to do.

--
Jan

Image