Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP Enable/Disable Command Buttons
Message
De
22/06/2000 16:56:38
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00383372
Message ID:
00383446
Vues:
14
>I have an ASP page, part of a corporate Intranet application that was just begun, using IE5 only as a browser. What I would like to do is Disable/Enable the Page Next/Previous command Buttons depending upon which Page the user is on. I have Next and Previous Procedures that are functional (toggle the page and do not crash and burn), using VBScript. Here is the basic concept of what I have done.
>
>Due to formating requirements of this web site, html brackets, double quotes, etc. are not included.
>
>html
>head
>META NAME=GENERATOR Content=Microsoft Visual Studio 6.0
>
>Language=VBScript
>
>form id=frmQPR name=frmQPR
>
>script Language=vbScript
>‘ Define variable…
>dim gForm
>
>Sub Window_OnLoad()
> set gForm = document.forms(frmQPR)
>‘ Place code here to evaluate status of Previous/Next page command
>‘ Buttons, based on Page being displayed…
>End Sub
>/script
>
>body
>HTML and ASP code goes here
>
>script Language=vbScript
>
>Sub Next_Page()
> ‘ Code to Evaluate cmdNext for page…
>gForm.cmdNext.disabled = true
>
>End Sub
>
>/script
>
>/BODY
>/head
>/HTML
>
>When the code hits gForm.cmdNext.disabled = true, I get an Error – Object doesn’t support this property or method ‘gForm.cmdNext’. Am I on the right track or not?
>
>The above code is not the prototype – just ment to focus on the approach so others can more easily understand the direction I am attempting. Can an object be defined and address in this manner? VFP is so much easier. Any ideas or approaches to this question will be appreciated.
>
>Tom

Make sure you are executing this on client side code. If you are using Visual Interdev and HTML button controls then if you select the script outline in the toolbox (left frame) you will be able to select the button's onclick under the Client objects tree.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform