Results 1 to 6 of 6

Thread: Adding script to buttons
      
   

  1. #1
    SirChick is offline Sergeant
    Join Date
    Jun 2007
    Posts
    24

    Default Adding script to buttons

    If i wanted to make a script run upon a click on a submit button where in the html properties of the submit button does it go to? Before/after the tag etc?

    If i know this i can finally get my registration code to work

  2. #2
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Adding script to buttons

    You need to create a form. The "action" attribute of the form is where the script should go that is executed when the form submits

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  3. #3
    SirChick is offline Sergeant
    Join Date
    Jun 2007
    Posts
    24

    Default Re: Adding script to buttons

    so it goes directly after the action attribute in the code? i cant find action though

  4. #4
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Adding script to buttons

    I don't use BV, so I don't know exactly where it is, or the exact name, but I know that you have to create the "form" element for the page. You can't just insert the text box's and a submit button, you have to insert the form field for the text and submit elements. That form element should have the option to change the action in the properties, or what not (right click, its somewhere in there).

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  5. #5
    SirChick is offline Sergeant
    Join Date
    Jun 2007
    Posts
    24

    Default Re: Adding script to buttons

    Yeah i got that far, i just needed to put mysql code in to say what table and what database, but whas unsure on where to put the code logically in the page html.

  6. #6
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Adding script to buttons

    The procedure is simple:

    As Watdaflip said, you create a form that collects the necessary info. Set the form action to be the script that will do the job. The info is submitted to the script, the database updated, and then the script redirects to a confirmation page. The confirmation page can be combined with the script. In that case, place the script in the Start of Page tag of the confirmation page, so if something goes wrong you can redirect the user to an error page.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49