SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: javascript form

  1. #1
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    javascript form

    I have a payment form. I want to use javascript that once select the card type the total amount shows at the bottom of the form will be changed (as credit card will be charged for 2% more of the total amount).

    I know how to write the script that the amount shows in a text box. But I can't use the text box here as the amount shouldn't be changed manually.
    So how should I write the script?

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Use text box with disabled="true" set.
    Saul

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can I set a default value? I mean when I refresh the page, an amount will show. Then When I select the select card type, the amount will be changed.

    Now the amount shows empty once I refresh the page, only the amount shows when I select the card type.

  4. #4
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    value="amount"
    Saul

  5. #5
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the amount can't post to the next page then.
    If i set value="amount" then next page will only show the amount, it wont show the correct amount (after add the credit card charge)


Bookmarks

Posting Permissions

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