Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Process a request
Message
From
12/12/2001 15:28:43
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
12/12/2001 12:37:58
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00593092
Message ID:
00593507
Views:
23
Dan,

Thanks, this works. But the other objects are still generated first, then the click() method is called, then I run my process then I can navigate to a different page. How can I avoid the first step and proceed directly to my click() method?

I realize that the POST calls the same request when the button is pressed, so perhaps I can specify what url is called in the post?

Basically, the way the sample works is great. But when the button is pressed, I want to perform the click() method, generate a new page and not bother with regenerating objects I am not going to display anyway.

Thanks,

Jerryt



>In your Click method, do your processing then call the Navigate method to navigate to your new page:
>
>
>This.Parent.Navigate('your url')
>
>
>should do it.
>
>>I understand the following voodoo example of having a push button change the text of a textbox.
>>
>>
>>***Straight from the voodoo docs. Works fine. Keeps displaying same
>>***page with different text.
>>LOCAL loPage
>>loPage = NewObject("WCPage","voodoo.prg")
>>loPage.NewObject("txtDemo","WebTextbox","voodoo.prg")
>>loPage.txtDemo.Label = "Example Text: "
>>loPage.NewObject("cmdTest","DemoButton","shop_wizards.prg")
>>loPage.DoEvents()
>>Response.Write(loPage.Render())
>>
>>DEFINE CLASS DemoButton AS WebButton OF Voodoo.prg
>>   Caption = "Click Me!"
>>	
>>   FUNCTION Click
>>      IF NOT THIS.Parent.txtDemo.Value = "This rocks!"
>>         THIS.Parent.txtDemo.Value = "This rocks!"
>>      ELSE
>>         THIS.Parent.txtDemo.Value = "How about this?"		
>>      ENDIF
>>   ENDFUNC
>>ENDDEFINE
>>
>>
>>However, what I want to do in the click() method of the button is to run some process, and then display a totally different page to the user. I must be missing something but how do you do this with the voodoo controls?
>>
>>
>>***Same as above except for the click() method.
>>LOCAL loPage
>>loPage = NewObject("WCPage","voodoo.prg")
>>loPage.NewObject("txtDemo","WebTextbox","voodoo.prg")
>>loPage.txtDemo.Label = "Example Text: "
>>loPage.NewObject("cmdTest","DemoButton","shop_wizards.prg")
>>loPage.DoEvents()
>>Response.Write(loPage.Render())
>>
>>DEFINE CLASS DemoButton AS WebButton OF Voodoo.prg
>>   Caption = "Click Me!"
>>	
>>   FUNCTION Click
>>     ***Process some stuff here.
>>     ***Then display a new web page showing something different to the user.
>>
>>     ***This displays my new objects and the old objects.
>>     ***I don't want the old objects, just my new ones.
>>     ***What am I missing.
>>     loPage = NewObject("WCPage","voodoo.prg")
>>     loPage.NewObject("lbl_label","WebLabel","voodoo.prg")
>>     loPage.lbl_label.caption = "Hello World"
>>     loPage.DoEvents()
>>     Response.Write(loPage.Render())
>>   ENDFUNC
>>ENDDEFINE
>>
>>
>>Thanks,
>>
>>Jerryt
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform