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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Apr 2010
    Posts
    417
    Thanks
    4
    Thanked 1 Time in 1 Post

    address book with a slight difference

    Time scale: needed doing within the next few days or at least being worked on soon. Completed with 3 days if possible, longer if needed.

    Costings: I have had a few quotes all around $5 to $15, prepared to give a little more if done sooner. I have not had anyone confirm they are going to take this on, only interest replies as yet with their quotes.

    First person to come forward and say interested and gives a realistic quote for this project and can start soon (today would be an advantage) wil get the job.

    (I shall post back here if job is taken)

    Project Details:

    I already have a site working and the ‘users’ is already in use, below is the method that each script should take on.


    ok first of, please do not add in any CSS or fancy design as this would more than like l get stripped! I am after just the bare bones and will be integrating this into what i currently have. Just to save you a bit of time.

    I have already got a MySQL database which must be kept the same so the rest of the site works.

    CREATE TABLE IF NOT EXISTS `users` (
    `user_id` bigint(11) NOT NULL auto_increment,
    `username` text NOT NULL,
    PRIMARY KEY (`user_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    CREATE TABLE IF NOT EXISTS `friends_details` (
    `friend_id` bigint(20) NOT NULL auto_increment,
    `user_id` bigint(20) NOT NULL,
    `friend_name` text NOT NULL,
    `friend_mobile` text NOT NULL,
    `friend_addresses` text NOT NULL,
    PRIMARY KEY (`friend_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    ok for your part I will require two pages ‘add/remove a friend’ and ‘update friends details’

    Each ‘user’ can only access their own ‘friends’

    The ‘add/remove a friend’ will allow then to enter a new unique ‘friend name’ with the option to click a link that says ‘add another friend’ I am currently using a client side JavaScript to add a few field to the form.
    They can also select a ‘friend name’ to delete, with a submit button to be clicked to remove the friend with a message saying that it was removed. But still on the same page to perform further removals or additions or the ‘friends name’

    The second page is the one that I am having problems with.

    The page starts with select a ‘friends name’ to edit, which automatically [onchange() function] takes them to the next stage that shows the ‘friends mobile’ [text field], and if any exist the addresses for that ‘friend’. below this is a link ‘add a new address’ [using client side JavaScript, to add a new text area field to the form], that when clicked adds a new [text area field] to the form.

    I have 90% of this done, apart from the address bit which I did have using a third database but all addresses got mixed up and did not update correctly, and were all entered in their own lines!

    I have opted to have them all in a text field in the MySQL ‘friends_addresses’ with each address separated buy the phrase...

    ||

    i.e

    1 High Street, London, SE1 1EA||2 High Street, London, SE1 1EA

    I also wish to allow the addresses to be deleted by the user.

    All MySQL functions should use escaping methods.


    Please let me know how long you think it may take you to do this, I will not quote you on this estimate, it is just a guide line for me to work on.



    Below are some of the scripts I was using, but may be of help to you.


    function addmore(addwhat) {
    if (addwhat == 'addresses') {
    fieldid = 'addressesdiv';
    }
    if (addwhat == 'names') {
    fieldid = 'namesdiv';
    }
    var dv = document.getElementById(fieldid).innerHTML;
    var lines = dv.match(/<br>/ig).length;

    if (addwhat == 'addresses') {
    var container=document.getElementById('addressesdiv');
    var form_field=document.createElement('textarea');
    form_field.id='name' + lines;
    form_field.name='address' + lines;
    form_field.cols=30;
    form_field.rows=2;
    container.appendChild(form_field);
    var br_field=document.createElement('br');
    container.appendChild(br_field);
    }
    if (addwhat == 'names') {
    var container=document.getElementById('namesdiv');
    var form_field=document.createElement('textarea');
    form_field.id='name' + lines;
    form_field.name='name' + lines;
    form_field.style.width = '250px';
    form_field.rows=2;
    container.appendChild(form_field);
    var br_field=document.createElement('br');
    container.appendChild(br_field);
    }
    }




    The above JavaScript was used using the follow HTML code on the relevant pages.

    <a href="#" onClick="JavaScript:addmore('names'); return false;" style="font-size: 12pt;">Add another friend</a>



    <a href="#" onClick="JavaScript:addmore('addresses'); return false;" style="font-size: 12pt;">Add another address</a>


    I have read this over and over again and altered here and there and think I have got it to how I need to explain what is needed.

    Cheers
    Last edited by jasonpc1; 11-12-2010 at 12:48 PM.

  • #2
    New Coder
    Join Date
    Nov 2010
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm interested in this. Got anyone on it yet?

  • #3
    Regular Coder
    Join Date
    Apr 2010
    Posts
    417
    Thanks
    4
    Thanked 1 Time in 1 Post
    This project has now been completed


  •  

    Posting Permissions

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