Log in

View Full Version : javascript "if statements"



LightBulb
08-27-2012, 09:51 PM
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

traq
08-28-2012, 01:32 AM
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.

jscheuer1
08-28-2012, 01:59 AM
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.