Jump to content

netaneledri

New Members
  • Posts

    6
  • Joined

  • Last visited

  • Days Won

    1

netaneledri last won the day on November 8 2013

netaneledri had the most liked content!

netaneledri's Achievements

Newbie

Newbie (1/5)

2

Reputation

  1. Sure , let me explain : At the start I just set new var called errors_count , this var will count how many errors we have. Later , on each condition you wrote , I increase the errors_count if the condition return true and found an error. At the end I return (errors_count == 0) , its mean If there are no errors (what means errors_count = 0 like in start) we will return true and the form will be submitted but if errors_count > 0 we have errors so it will be return false because errors_count now equals 0.
  2. function validateSurvey2() { var errors_count = 0; var err1 = document.getElementById('err1'); var err2 = document.getElementById('err2'); var err3 = document.getElementById('err3'); var err4 = document.getElementById('err4'); var question1 = document.survey.q1; var question2 = document.survey.q2; var question3 = document.survey.q3; var question4 = document.survey.q4; if(question1.selectedIndex === 0) { err1.style.display="inline"; question1.focus(); errors_count++; } else { err1.style.display="none"; } if(question2.selectedIndex === 0) { err2.style.display="inline"; question2.focus(); errors_count++; } else { err2.style.display="none"; } if(question3.selectedIndex === 0) { err3.style.display="inline"; question3.focus(); errors_count++; } else { err3.style.display="none"; } if(question4.selectedIndex === 0) { err4.style.display="inline"; question4.focus(); errors_count++; } else { err4.style.display="none"; } return errors_count == 0; } try that , I count every error and finaly return true / false by the errors count.
  3. We not able to help you do that without see the code , this is to general request.
  4. Thats not a problem because its local permission on the server , only one with access can do something with that. This permission give the option to view , edit and delete the file what fits the needs.
  5. No problem , thats was just 2 lines of code. If you looking for expert web developer to work with you , contact me on private message.
  6. Hey , I fixed the code for you and add chmod command to the final uploaded file to 777 (need it to view and delete picture from server). The fixed code can be found here : http://pastebin.com/5dqJ2m4F
  7. Hey My name is Netanel Edri , Im 18 years old from Israel. Im WEB Developer since 2009 - client & backend sides. I specialized in OOP Php development (design and develop complex web applications) and Expert in client side development of super interfaces using HTML5 , Javascript (custom widgets/plugins , native coding and frameworks usage). Im also specialized in UI/UX. I really love what I do and I hope to be active member of this community. I will be glad to help anyone who needs my help in web development.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.