Calling a form from URL.

forum.centura.web.developer (2000-2005) & forum.td.web (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Calling a form from URL.

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Calling a form from URL.

Post by NewsgroupServer » 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 ?

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Calling a form from URL.

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Calling a form from URL.

Post by NewsgroupServer » 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.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Calling a form from URL.

Post by NewsgroupServer » 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.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Calling a form from URL.

Post by NewsgroupServer » 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...

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Calling a form from URL.

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Calling a form from URL.

Post by NewsgroupServer » 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 [Crawler] and 0 guests