SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dreamweaver and javascript : can Dreamweaver handle this?

    Hi all,

    Is javascript built into Dreamweaver MX such that it will write the code necessary to total 3 input fields of a form into a 4th 'total' field?

    My question is all there (above) but for more detail:

    I'm working on a HTML form using Dreamweaver MX. I want the user to be able to enter 3 numbers (scores, actually, between 0-3 from drop-down boxes), and for a 4th field to be automatically populated as a running total of the combined values of these three fields.

    Eg.
    0 (user input)
    1 (user input)
    3 (user input)
    =
    4 (display field based on adding fields #1, #2, #3 using javascript).

    Can Dreamweaver MX do the javascript necessary to achieve this (if so how/where)? Or do I have to find the code from an external javascript resource and hand-code it in myself?

    I'm hoping the former but I 'fear' the latter...

    Thanks v. much.
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  2. #2
    SitePoint Guru Husain's Avatar
    Join Date
    Sep 2001
    Posts
    620
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Surprise! Dreamweaver can - however you need to download an extension available at:

    http://www.yaromat.com/dw/?t=Behavior&r=forms
    (at the end of the page)

  3. #3
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fantastic! We'll give it a go and report back if we have any problems or follow up questions.

    Thanks very much.
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  4. #4
    SitePoint Member
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello -

    I've tested the yaromat "calculate form" extension and found it easy to use. I found it simple to make text field values calculate... however was unable to calculate values from drop down menus.

    Ultimately, I need a solution (either a dreamweaver or code source) that will allow me to add values from drop down boxes and display the total in a text field in realtime.

    Any help appreciated.

    thanks,

    Ben

  5. #5
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't take this the wrong way but the tasks that you're looking to do with javascript are fairly straighforward. You could probably write something yourself to do it. You could also look for some help in the javascript forum.

  6. #6
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Makeda,

    Yes, we did end up doing this by hand-coding the javascript ourselves.

    I guess what we were trying to see is how far we could push Dreamweaver from a WYSIWYG perspective. Just goes to show (once again) that professional web site development will (probably) never be 100% possible without getting your hands dirty :-)
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  7. #7
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Especially with something like javascript. There are certain tasks that you can kind of standardize, like roll-overs but using the DOM to implement certain business rules can be rather pointless to build into a WYSIWYG becuase everybody has different needs.

    Glad your stuff worked.

  8. #8
    SitePoint Member sTyLnK's Avatar
    Join Date
    Oct 2003
    Location
    BC
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by benskey
    Hello -

    I've tested the yaromat "calculate form" extension and found it easy to use. I found it simple to make text field values calculate... however was unable to calculate values from drop down menus.

    Ultimately, I need a solution (either a dreamweaver or code source) that will allow me to add values from drop down boxes and display the total in a text field in realtime.

    Any help appreciated.

    thanks,

    Ben

    hey, so how do I add values from a drop down menu?......it may be straightforward, but i'm a newbie.....:'(

  9. #9
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi sTyLnK,

    Thanks for the PM. Just to confirm - Dreamweaver is not really designed to do this. Hand-coded javascript is the only way to go.

    Try http://www.dynamicdrive.com or do a google search for javascript tutorials or scripts

    Luck.
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise


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
  •