Calling a form from URL.

forum.centura.web.developer (1998-2005) & forum.td.web (2005-2010)
czavala
Honduras
Posts: 197
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

Calling a form from URL.

Post by czavala » 02 May 2007, 16:37

 Posted by:  Conrado ZAVALA 

Dear Forum,

I'm trying to call a form from a URL but when I do a
http://localhost/scripts/cwisapi42.dll?Service=LIBDCDebug&Form=frmInTransit
I don't get the program to process PgmReceiveControl( ) function. Is there
a way to mimic a call to PassControlByName( ) perhaps with a JavaScript or
else. I will appreciate your answer.

Regards and have a nice day.

Conrado

Yannick Fenner

Re: Calling a form from URL.

Post by Yannick Fenner » 04 May 2007, 10:58

 Posted by:  Yannick Fenner 

How do you call the form ?

PgmReceiveControl is called when another form use the PassControl function.
I guess that's not your case so how do you call the form ?

czavala
Honduras
Posts: 197
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

Re: Calling a form from URL.

Post by czavala » 07 May 2007, 16:54

 Posted by:  Conrado ZAVALA 

Hello Yannick,

Currently I'm calling PassControlByName( "frmMyForm" ) in a button and I
would like to replace with a hyperlink.

Regards,

Conrado

Yannick Fenner

Re: Calling a form from URL.

Post by Yannick Fenner » 08 May 2007, 17:44

 Posted by:  Yannick Fenner 

OK then, here is a solution that should work for you:

You override the Initrender function :

Function: InitRender
Description: called at the start of rendering, override for any special
processing
Returns
Parameters
Static Variables
Local variables
Actions
Call cWebReusableForm.InitRender( )
Call ..AfterInitRender( )

Then you just have to call the Afterinitrender function, and put whatever
you want there. Should work fine.

HTH,

Yannick.

czavala
Honduras
Posts: 197
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

Re: Calling a form from URL.

Post by czavala » 12 May 2007, 19:13

 Posted by:  Conrado ZAVALA 

Thank You Yannick. I tried this but now the problem is that statevariable
does not get transferred.

Yannick Fenner

Re: Calling a form from URL.

Post by Yannick Fenner » 14 May 2007, 08:24

 Posted by:  Yannick Fenner 

Well you can use parameters.

If you can't, for whatever reasons, you can use cookies.

Just use the WebPutCookie function, then you get the value in your form, and
you start from there.

If you really need to call a form from a URL, this may be your solution...

czavala
Honduras
Posts: 197
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

Re: Calling a form from URL.

Post by czavala » 14 May 2007, 16:29

 Posted by:  Conrado ZAVALA 

Thanks Yannick... I beleive I'll have to redesign my form to accomplish
this. I'm currently using to many state variables.

:(

Conrado

SurenBehari
United States of America
Posts: 305
Joined: 12 Apr 2021, 14:50
Location: Santa Clara, US

Re: Calling a form from URL.

Post by SurenBehari » 15 May 2007, 23:00

 Posted by:  Suren Behari 

Hi Conrado,

An option:
Send the click() event from the calling form to a hidden Pushbutton
cWebHTML: HTML_Link
Link to
frmInTransit

cWebButton: pbHidden
On SAM_Click
Call WebSetStateVar( "stVar1", "suren" )
Call frmLinkFrom.PassControlByName( "frmInTransit" )

Thanks,
Suren

Return to “td.web”

Who is online

Users browsing this forum: [Ccbot] and 0 guests