SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru DeNasio's Avatar
    Join Date
    May 2001
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why won't onsubmit work?

    I don't get it. I'm currently rewritting my signup script for one of my sites. I want to use javascript to alert users that they have not filled out certain fields. But the damn thing just won't work! I don't know what the problem is, I've used the same script and method on many other sites and they all work. Can you guys take a look at the codes for me and see if you guys find the problem?

    The page is located at:
    http://www.formlog.com/signup2.php

    and the javascript is located at:
    http://www.formlog.com/help2/javascript.page.js
    Ballot-Box.net - free polls for webmasters
    FormLog.com - free form processor

  2. #2
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think there is error in your javascript. Since AFAIK there is no <> operator in javascript you need to use != instead. So try:
    Code javascript:
    if (captcha.length != 5)
       {
       alert("Please enter the correct text from the image!");
       return false;
       }
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  3. #3
    SitePoint Guru DeNasio's Avatar
    Join Date
    May 2001
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    rajug, I owe you a beer man!! Problem was like you said it was.

    By the way, what is AFAIK?
    Ballot-Box.net - free polls for webmasters
    FormLog.com - free form processor

  4. #4
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AFAIK = As Far As I Know! Lol!!!!!
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  5. #5
    SitePoint Guru DeNasio's Avatar
    Join Date
    May 2001
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol, I thought AFAIK was some kind of convention or something, like "since AFAIK there is no <> operator in javascript"
    Ballot-Box.net - free polls for webmasters
    FormLog.com - free form processor


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
  •