SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 29 of 29
  1. #26
    SitePoint Addict xDev's Avatar
    Join Date
    Jul 2003
    Location
    Moncton, New Brunswick, Canada
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have a solution for you here:
    http://www.xdevdesign.com/spf/QUOTES.htm

    View source and grab the code.

    Changed a few things like the submit and minor things in the script here and there (basically you were almost there).

    The reason I took out the submit and replaced it with a button is because the page was reloading, that's not what you want since your looking for a straight DHTML solution. If you wish to submit the form then you can use a server-side language for that. The results will be the same but the page will reload everytime and you'll have to convert the existing code into another language. Asit is now, the first and last name isn't required if you are just going to display the costs and names ... since nothing is being submitted. The page is just responding dynamically and calculating based upon the fields, nothing more

    -xDev

  2. #27
    always learning . . .
    Join Date
    Nov 2003
    Location
    UK
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    o WOW, cheers, im not sure he meant post here you know rather than the other but either helps loads thanks.
    So was it then the refresh messing it up ? because the form was submitting and refreshing ?

  3. #28
    SitePoint Addict xDev's Avatar
    Join Date
    Jul 2003
    Location
    Moncton, New Brunswick, Canada
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by abcdef
    So was it then the refresh messing it up ? because the form was submitting and refreshing ?
    Yep

    You can't do an innerHTML after the page reloads. It is a static method that only works on the same page. You could parse the query strings and insert the values but that is more suited to a server-side solution and you would have to redo all the code into PHP or ASP.

    -xDev

  4. #29
    always learning . . .
    Join Date
    Nov 2003
    Location
    UK
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Absolutly Wicked, Thanks ever so much for your help on this. Amazing stuff.
    Love this site. learnt loads and quickly.

    On an end note? do you know how to protect source?

    and also if getting a book should i get one DHTML or JAVASCRIPT ?

    also am getting a PHP book as thats next in line to learn with ASP also. Looking foward to that!


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
  •