Results 1 to 5 of 5

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

  1. #1
    Join Date
    Jun 2009

    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
    Bucharest, ROMANIA
    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 07:13 AM.

  3. #3
    Join Date
    Jun 2009
    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
    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
    Bucharest, ROMANIA
    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 03: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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.14297 seconds
  • Memory Usage 2,892KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (5)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (73):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates