Go Back   CodingForums.com > Web Projects and Services Marketplace > Web Projects > Small projects (quick fixes and changes)

Notices

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-12-2010, 11:43 AM   PM User | #1
jasonpc1
Regular Coder

 
Join Date: Apr 2010
Posts: 417
Thanks: 4
Thanked 1 Time in 1 Post
jasonpc1 is on a distinguished road
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 11:48 AM..
jasonpc1 is offline   Reply With Quote
Old 11-19-2010, 08:03 PM   PM User | #2
CyanPrime
New Coder

 
Join Date: Nov 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
CyanPrime is an unknown quantity at this point
I'm interested in this. Got anyone on it yet?
CyanPrime is offline   Reply With Quote
Old 11-20-2010, 05:43 AM   PM User | #3
jasonpc1
Regular Coder

 
Join Date: Apr 2010
Posts: 417
Thanks: 4
Thanked 1 Time in 1 Post
jasonpc1 is on a distinguished road
This project has now been completed
jasonpc1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:43 PM.


Advertisement
Log in to turn off these ads.