www.webdeveloper.com
Results 1 to 5 of 5

Thread: [RESOLVED] Check a number value from an existing set of numbers?

  1. #1
    Join Date
    Jun 2009
    Posts
    2

    resolved [RESOLVED] Check a number value from an existing set of numbers?

    I am rather new to JavaScript and am in need of some major help. I do not have the time or even the knowhow to get this done. To me, it doesn't sound all that difficult to do, but I don't know where to start.

    ----------

    I need a small form field, that when submitted, checks to see if that number is in the list of numbers that we have been set aside. (the list of numbers can be in the code, or in a separate doc)

    If it returns "false", then a small div id#false in my html gets its CSS property set to "display:block;"

    If returned "true", then a different div id#true in my html gets its CSS property set to "display:block;"

    ----------

    Here is why I am trying to do this.
    The idea is that I have a string of numbers sent out to customers. These customers go back to the website and enter in their number. If the number matches the ones set aside, then they get a special message. If not, they get another.

    Even just a little help on this would be awesome.
    And Thank You in advance.

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by Sane View Post
    I do not have the time or even the knowhow to get this done. [...] but I don't know where to start
    Hmm. That was not a very wise way to ask for help.

    I am sorry to say that, but... If you nave neither time nor knowledge, how did you get that job? What makes you think that we will have time and knowledge to do your job? That was not a very diplomatically demand

    Start with learning javascript.
    Last edited by Kor; 06-04-2009 at 08:13 AM.

  3. #3
    Join Date
    Jun 2009
    Posts
    2
    Please keep in mind, I am a very low level designer that is just tying to do something this for my small family business. In fact I have no idea how to edit the post to make it sound nicer.

  4. #4
    Join Date
    Oct 2008
    Location
    U.S.
    Posts
    726
    To me, it doesn't sound all that difficult to do,
    It's not, really, with a little bit of know-how
    but I don't know where to start.
    Me neither really, although I do know a few ways to go about it...
    First, I would have to ask if you are able to use php file instead of html. The reason I ask, is there could be security/fraud issues with doing this from the client's side (javascript). Would there be any complications (financial or whatever - don't know unless know what the incentive from the revealed content via the number is, if it's a discount or prize or something like that, then you are open to fraud if using javascript for this) for you if the customer actually received one number from you, but looked in the js file and saw the list of valid numbers and then entered one of them instead of what was sent to them? If you did it from a server side script (such as php), you could send the customers links instead with the 'number' as a variable in the url, such as: http://example.com/prize.php?u=73r832t01g where 'u' is the variable string '73r832t01g' and you could then check whether that is in an array on the server side or not by checking $_GET["u"]. This way the customer doesn't even have to enter the (not actually a) 'number', and would be very difficult to come up with the right url query string. (You could auto generate the url's with random variable strings when you initially set-up the page) Plus, you would not need to have both the false and true elements in the html, could just echo the correct one from php.
    Note this is just one suggestion, could be other variations as well.
    Even just a little help on this would be awesome.
    Then you are thrilled already!
    And Thank You in advance.
    Sorry, but that's actually a bit of a presumptive 'turn-off' for me sometimes... (thank us after we've helped you) although I feel it's less so in this particular case for me to say "you're welcome" already...

  5. #5
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    By short: to create a good and secure web site - now this is a real professional job. It's almost like being a doctor. It's almost like being several doctors. If you are not a doctor, you must pay/hire one. Or learn almost everything a doctor knows. There is no place for amateurs.

    To do what you intend to do, you must:
    - learn how to use a graphical tool (Photoshop is the most famous, but the license is quite expensive)
    - learn HTML
    - learn CSS
    - learn Javascript
    - learn Data Base handling (MySQL is freeware)
    - learn a server-side language (php is freeware)

    You may also need to know the basics of XML and, probably AJAX.

    Al these are minimum of you need to know.

    See? There is room for 2-3 experienced people, and you want to do it by yourself in a minute, without learning anything. Of course, you may build yourself a small house without being an architect. But nobody will guarantee your house woun't collapse next storm. Even so, you must learn a little bit of Mechanics, Resistance Theory, Geology, Carpentry ... and stuffs like that. That will take you some time. But if you must do it by yourself, you must learn those things by yourself. Otherwise, you must hire a professional. There is no middle way.
    Last edited by Kor; 06-04-2009 at 04:29 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles