osCmax v2.5 User Manual
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

url validation in form_check.js.php

This is a discussion on url validation in form_check.js.php within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hello im new to osCmax and im not used to javascript at all but i think im on a good ...

      
  1. #1
    New Member
    Join Date
    Jun 2010
    Posts
    10
    Rep Power
    0


    Question url validation in form_check.js.php

    Hello

    im new to osCmax and im not used to javascript at all but i think im on a good way

    i dont need address data of my customers because im only selling virtuell goods, so i am trying to use the street address field for their profile link
    that wasnt the hard part

    now im trying to add a validation to form_check.js.php to make sure its the right profile link

    Code:
    function check_fb(field_name, message) {
        var field_value = form.elements[field_name].value;
        var fb_link = field_value.indexOf('profile.php');
        
        if (fb_link==-1) {
          error_message = error_message + "* " + message + "n";
          $error = true;
        }
        
    }
    the function gets called like this:

    Code:
    check_fb("street_address", <?php echo NO_FB_LINK; ?>);
    but i am getting no result or error.

    i would be glad if any expierienced user could have a look at it and tell me how to do it right

    thanks in advance

  2. #2
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: url validation in form_check.js.php

    I'm not that experienced but just out of curiosity, what do you mean by profile link? maybe their can be an alternative way in getting this same solution...

  3. #3
    New Member
    Join Date
    Jun 2010
    Posts
    10
    Rep Power
    0


    Default Re: url validation in form_check.js.php

    Quote Originally Posted by blackhawk View Post
    what do you mean by profile link?
    the community profile link of the customer

    domain/profile.php?id=*profile id*

  4. #4
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: url validation in form_check.js.php

    hmm...im not sure where you are trying to go with creating a community profile link. every user who signs up with your store simply becomes a member of shopping for their own products, not community chit-chat between themselves. but in regards to your first request (not dealing with shipping addresses) you can take of the restrictions of having to add a shipping address by following these steps mentioned here....

    Help making Telephone number NOT mandatory

    these steps will also lead you to hiding that text and input box on the create an account page.

    once the use creates an account, they can shop for your virtual projects. but what more are you trying to accomplish than that?

    now if you want a true "community chat" system - with less fuss, how about creating a new custom info box that links to another php web folder on your server that has http://www.phpbb.com/ . Just an idea
    Last edited by blackhawk; 06-25-2010 at 03:27 PM.

  5. #5
    New Member
    Join Date
    Jun 2010
    Posts
    10
    Rep Power
    0


    Default Re: url validation in form_check.js.php

    i think you got me totally wrong
    i am selling virtuell goods from games that can be found on facebook, to deliver those goods i need the facebook profile link of my customers

    i allready removed every input field that isnt needed and i am using the street address field as the profile url field , this way i can see their profile url within the order under shipping

    now i just need a validation to check if its the right url they entered because alot of them entering their game profile url.

  6. #6
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Wink Re: url validation in form_check.js.php

    Blackhawk, did your crystal ball not tell you that Facebook (yuk) profiles was the issue?

    Hosting plans with installation, configuration, contributions, support and maintenance.

  7. #7
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: url validation in form_check.js.php

    ooohhh - my bad! My crystal ball should of been on point with that! Sorry guys.

  8. #8
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Smile Re: url validation in form_check.js.php

    Why not use the company field - Found in admin under customer details and simply rename it in the language file.

    Regards,
    pgmarshall
    _______________________________

  9. #9
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: url validation in form_check.js.php

    Code:
    now im trying to add a validation to form_check.js.php to make sure its  the right profile link
    I think he's also trying to match that field to something (in oscmax?) to make sure the member has the correct settings.


    does this help????
    http://forums.oscommerce.com/topic/2...facebook-link/
    Last edited by blackhawk; 06-28-2010 at 07:54 PM.

  10. #10
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: url validation in form_check.js.php

    ...also try installing header tags SEO - it give you an option to add social network code.

    osCommerce Community Add-Ons


    ahh..and another article that reflects a possible solution....

    http://forums.oscommerce.com/topic/3...in-oscommerce/
    Last edited by blackhawk; 06-28-2010 at 08:26 PM.

Page 1 of 2 12 LastLast

Similar Threads

  1. help understanding form_check...
    By blackhawk in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 10-29-2009, 03:24 PM
  2. form_check.js.php needed everywhere?
    By MindTwist in forum osCmax v2 Installation issues
    Replies: 6
    Last Post: 08-23-2008, 02:25 AM
  3. css and dhtml validation
    By dilladog in forum osCmax v2 Installation issues
    Replies: 0
    Last Post: 09-03-2007, 12:37 PM
  4. Is this the correct file name? form_check.js.php
    By MintMoney in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 11-04-2003, 04:52 PM
  5. error in my form_check.js.php maybe???
    By oakleaf in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 10-31-2003, 01:19 PM

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
  •