Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I don't know what scripting language I need to solve my problem - Please Help

    I am not super familiar with code - I can easily take code and with a little direction get the desired end result so anyone who can help me with this it will be VERY appreciated. I don't even know what terms to search in order to create a page that I am looking for....

    So here goes:

    I want to model our distributor page after a R E D K E N.com Distributor Locator Page.

    Here is what happens....

    There is a drop down menu of the 50 states, and when you select the state the table of information below changes.

    screen shots below






    I am sure this is fairly easy to resolve, however I don't know where to begin.

    Thank You in advance for your time.

    Kristi

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,536
    Thanks
    80
    Thanked 4,490 Times in 4,454 Posts
    How many *TOTAL* distributors are there in the USA?

    If under a few hundred, you could do this all in a single HTML page with JavaScript.

    If more, you will likely need to use server-side coding as well.

    Also, be aware that if you do use JavaScript, then anybody who disables it in their browser (moderately easy to do...and there are a lot of idiotically paranoid people out there) won't be able to use the page.

    It's really a case of pick your poison. If you can do it all in a single page, that will be the easiest route, if you don't mind the JavaScript-must-be-enabled restriction.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Banned
    Join Date
    Mar 2012
    Posts
    306
    Thanks
    1
    Thanked 28 Times in 28 Posts
    Quote Originally Posted by Old Pedant View Post
    It's really a case of pick your poison.
    You don't even have to put yourself in that sort of situation. If a task can be done both server and client side, then it should always be done server side. Very often it can be done with less code server side. If it can't be done server side then the only other option is obvious. If you do it server side then you also don't have to worry about portable or mobile devices that don't even support javascript.

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,536
    Thanks
    80
    Thanked 4,490 Times in 4,454 Posts
    Well, first of all, this person strikes me as a real newbie who may be looking for the easiest rather then the best solution.

    But I do think that the best solution to this question might well be a two-pronged approach. Build it so that it could run with, say AJAX, but would have a fallback of server-only code.

    That wouldn't really be very difficult to achieve and would give you a better "feel" for those who do have JS enabled.

    Having said that, though, if I *had* to make an "either/or" choice, yes, I'd go all server-side.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Build the server side only version first - then enhance it with JavaScript.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #6
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you all for your feedback. It sounds as if I need to go with the "server side" option since that appears to be the best option especially for those who disable JavaScript - which I am sure there are plenty of these "Types" in our industry.

    Currently our distributor list is at about 85, however we have just signed on with 3 large distribution houses that have 300+ locations each, so I want to find a solution now before having to add the 900+ locations to our site.

    So if someone can point me in the right direction of a tutorial or tips on how to implement this server side it would be appreciated.

  • #7
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,145
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts
    Quote Originally Posted by kstew923 View Post
    So if someone can point me in the right direction of a tutorial or tips on how to implement this server side it would be appreciated.
    As this is a commercial application it would make best sense to employ a programmer to do the job for you - just as you would employ any other sort of expertise required for your business.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #8
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,536
    Thanks
    80
    Thanked 4,490 Times in 4,454 Posts
    Philip is of course right.

    This would take a professional programmer an hour or two to write, assuming you have a database (or at least an Excel spreadsheet?) of the company names and addresses.

    As for what server-side system to use: PHP or JSP or ASP or ASP.NET.

    If it's an Excel spreadsheet, and if you would prefer to leave it in a spreadsheet so it's easy for a non-programmer person to update and add a new version, then doing it in ASP or ASP.NET would be easy, as they can directly treat an Excel file as a database.

    Partly, this will depend on what kind of server machine you are going to use. If it's a Linux box, you are probably going to want to use PHP with MySQL database. ASP and ASP.NET only run on Windows servers.

    Are you capable of doing the page design? Using HTML code? Or would you just give this as, say, a WORD document or some such to the programmer and say "make it look like this"?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #9
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    Philip is of course right.

    This would take a professional programmer an hour or two to write, assuming you have a database (or at least an Excel spreadsheet?) of the company names and addresses.

    As for what server-side system to use: PHP or JSP or ASP or ASP.NET.

    If it's an Excel spreadsheet, and if you would prefer to leave it in a spreadsheet so it's easy for a non-programmer person to update and add a new version, then doing it in ASP or ASP.NET would be easy, as they can directly treat an Excel file as a database.

    Partly, this will depend on what kind of server machine you are going to use. If it's a Linux box, you are probably going to want to use PHP with MySQL database. ASP and ASP.NET only run on Windows servers.

    Are you capable of doing the page design? Using HTML code? Or would you just give this as, say, a WORD document or some such to the programmer and say "make it look like this"?
    I am not necessarily a newbie when it comes to web design or HTML - but I am definitely self taught. I have added PHP and MySQL data bases to our website etc, and can easily follow tutorials.

    I have no problem with getting a programmer to take care of this for us, and putting the information in an excel file is absolutely no problem.

    Whatever route we choose I want to make sure that is something that can be update easily on our end.

    If this is something I could do myself with a little direction I would love to know how to do it as I can see where something of this nature might behoove us in the future, if it is over my head I am not afraid to say so and would happily pay an expert in the programming field to execute this application so it works flawlessly within our site.

    I am beginning a MAJOR overhaul of our website as it is not as user friendly as it needs to be so I would like to easily move this feature to the new site once it is up and running.

  • #10
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,536
    Thanks
    80
    Thanked 4,490 Times in 4,454 Posts
    Well, if you are on a Windows server, then you could certainly use PHP with Excel.

    When running PHP on Windows, there is a build in object named COM that allows easy access to Excel.

    I don't use PHP, but if you know enough PHP to attempt this, I can show you the basics.

    But it's really time to move this thread to whatever server-side system you are going to use. PHP or ASP or whatever.

    Post an appropriate question in one of those appropriate forums.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #11
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for your help. We are working to decide the best route for this will post appropriate forum so the thread can move.


  •  

    Posting Permissions

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