Powered by:
FutureQuest Hosting


"...Remember being a youngster, mom or dad telling you "close the door"? Well the same applies to HTML ...."

Web Hosting
Shared       
Reseller     
VPS             
Dedicated 
Price:   $(US)
Space:     (MB)
Transfer:(GB)
Platform:


Advertise
Advertising Opportunities
Rate Card

Sponsor
Go Back   Webmaster Forums > Code Forum > Javascript Forum


Reply
 
Thread Tools Rate this Webmaster Discussion
  #1  
Old 11-01-2009, 09:39 PM
Bigmous Bigmous is offline
Member
 
Join Date: Dec 2008
Location: Sydney, Australia
Webmaster Discussions: 26
Rep Power: 6
Bigmous is on a distinguished road
Exclamation Major uni project emergency!!! add/remove data from one list to another

I've done something like this using an xml file. But how do you do something like this with a php form and data coming from a SQL Database.

can get data out of a selection list aka listbox, but now need to be able to select and move to and from the empty listbox.

this is an example of how i did it last year, which was an AJAX assignment. but not quite sure how to when reading from SQL.

_____________________________________________________________

function StudentManager ()
{
var students;
}

StudentManager.prototype.doIt = function(xmlDoc)
{
this.students = xmlDoc.getElementsByTagName("student");

var list = document.getElementById("slist");
var z=xmlDoc.getElementsByTagName("subject");
for(i = 0; i < z.length; i++)
{
if(z[i].attributes.getNamedItem("subjectName").nodeValue == "Interface Design")
{
var y=z[i].getElementsByTagName("student");
for(j = 0; j < y.length; j++)
{
var option = document.createElement("Option");
option.innerHTML = y[j].attributes.getNamedItem("surname").nodeValue + ", "+ y[j].attributes.getNamedItem("givenName").nodeValue;
option.value = y[j].attributes.getNamedItem("surname").nodeValue + ", "+ y[j].attributes.getNamedItem("givenName").nodeValue;
list.appendChild(option);
}
}
}
};

Thanks

Mous


Reply With Quote
Reply
Sponsor

Bookmarks

Tags
major , uni

Thread Tools
Rate This Thread
Rate This Thread:

 

Similar Webmaster Discussions
Thread Webmaster Discussion Starter Forum Replies Last Post
Update of data using PHP truncates text data jej1216 PHP Forum 3 12-27-2008 11:29 PM
How to Remove underline from hyperlink? squallsq86 CSS Forum 5 10-27-2005 01:24 PM
how to close or remove a frame Codyg Javascript Forum 12 06-04-2004 02:16 PM
Remove frames and put everything in one page. minds_gifts HTML Forum 2 06-22-2003 12:20 PM
remove browser toolbars mudhead HTML Forum 1 09-18-2000 12:30 PM


All times are GMT -5. The time now is 05:47 PM.

Copyright © 1999 - 2009 Advanced HTML For Beginners and AHFB2000. All rights reserved.
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.