Results 1 to 3 of 3

Thread: javascript "if statements"

  1. #1
    Join Date
    Aug 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default javascript "if statements"

    I am building a form in html which then goes to a php script and send the completed form,

    The form makes calculations with javascript then sends the form to me and also a copy to the client,

    However, most of the form is ok appart from the calculated bit, it will not send the result of the calculation by e-mail with it being in <span> tags, it will however send if i use <input class> tags but this gives me the problem of not being able to use "if statements" on this part of the form,
    Can anyone help or advise on this issue ?

    Regards,
    LightBulb

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    You seem to have started several threads with similar (or identical) questions.
    Please keep all related topics/questions in one thread. This will allow other users to give you better, more complete answers, and will also help users that have the same problem.

    Remember, never post the same question/topic in multiple forums.

    Your question is unclear.
    Please provide more information, and be as specific as possible.
    • What do you want to accomplish?
    • What have you already tried?
    • What problems did you encounter?

    Also, please be sure that you have included all relevant code and/or a link to the page in question.


    I can't offer much without seeing your code.
    If I understand your question correctly (and it's quite possible I don't - what you're asking is a little unclear), then you seem to have already found your answer: put the result in an <input>, not a <span>. I don't see how this would affect your javascript, one way or the other.
    Last edited by traq; 08-28-2012 at 01:38 AM.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There is no <input class> tag. Perhaps you mean <input> tags. Javascript has nothing to do with markup anyway. If the markup is valid, javascript can be written to work with that markup.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    Last edited by jscheuer1; 08-28-2012 at 02:07 AM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. A href needs two javascript statements
    By sniperman in forum JavaScript
    Replies: 1
    Last Post: 08-16-2009, 08:38 AM
  2. Conditional statements with IE
    By fred2028 in forum CSS
    Replies: 5
    Last Post: 04-14-2009, 01:59 AM
  3. Replies: 5
    Last Post: 07-29-2008, 01:16 PM
  4. help with for statements
    By grapevine in forum JavaScript
    Replies: 1
    Last Post: 05-26-2007, 07:54 AM
  5. If Else statements in CSS
    By nballon in forum CSS
    Replies: 13
    Last Post: 09-03-2006, 04:35 AM

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
  •