Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Scriptaculous Drag Drop And Database Integeration!


I'm working on a drag and drop feature with the scriptaculous
javascript library. And I was wondering if someone could help me! :(

Here is some test code. Basically, when someone takes something from
the left side and puts it in the right side, I just want to run a
database query.

I have NO IDEA how to do this because of my limited javascript
experience.

<script
src="http://www.mytuneslive.com/_NEW/MORPH/javascripts/prototype.js"
type="text/javascript"></script>
<script
src="http://www.mytuneslive.com/_NEW/MORPH/javascripts/effects.js?1.7.0b1"
type="text/javascript"></script>
<script
src="http://www.mytuneslive.com/_NEW/MORPH/javascripts/scriptaculous.js"
type="text/javascript"></script>
<link rel="stylesheet"
href="http://www.wiki.script.aculo.us/stylesheets/application.css"
type="text/css" media="screen" />
<div style="height:200px;">
<div style="float:left;">
<h3>This is the first list</h3>
<ul class="sortabledemo" id="firstlist"
style="height:150px;width:200px;">
<li class="green" id="firstlist_firstlist1">Item 1 from first
list.</li>
<li class="green" id="firstlist_firstlist2">Item 2 from first
list.</li>
<li class="green" id="firstlist_firstlist3">Item 3 from first
list.</li>
</ul>
</div>
<div style="float:left;">
<h3>And now the second list</h3>
<ul class="sortabledemo" id="secondlist"
style="height:150px;width:200px;">
<li class="orange" id="secondlist_secondlist1">
<span class="handle">DRAG HERE</spanItem 1 from second list.
</li>
<li class="orange" id="secondlist_secondlist2">
<span class="handle">DRAG HERE</spanItem 2 from second list.
</li>
<li class="orange" id="secondlist_secondlist3">
<span class="handle">DRAG HERE</spanItem 3 from second list.
</li>
</ul>
</div>




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
File Upload By Drag & Drop
Can anybody tell me how to upload a file by dragging it onto a web
page? Using the <input = "file" .....> it is possible to upload files,
but files cannot be dragged onto web pages for uploading.. Any
suggestions? I found a few Java based stuff but none of them were free.

Drag And Drop Insertion In MySql
I'm developing a site in PHP/MySql that requires Ajax for this feature
: The user read an article and if ever he likes it he can drag it and
drop it into his "basket". Then when he'll consult its account he'll
found that article.

Fix My AJAX Drag And Drop Code
I've been working on a drag drop system and something happened when I
tried to switch the code from a working model to one with another
database. The drag drop still works, but the informatin in the
database is still not updating. I kind of got aggravated and could not
figure out the problem with my 4 months of PHP experience.

If anyone would like to look over the code, then go tot his URL and get
in touch with me if interested!

Drop-down Of Database Problem
I'm trying to create a drop-down of the 'members' column of the 'roster' table. As you'll see it looks completly ****ed up and in no way works. PHP Code:

Drop Down Populated By Database
Hopefully someone can help me with this: I currently have a php
file that pulls a query from the field "category" from my database.
this file is called category.php. I am trying to populate a drop down
box in another page (called add_subpage.php) from the results of the
category page. the code below is on the add_subpage.php file: (It was
my best guess and does not work)

<select name="category">
<option value="CAT"<?php include 'category.php' ?>></option>
</select>

Can anyone tell me how to make this drop down populate from the
category php file?

Drop Down Populated By Database
I currently have a php
file that pulls a query from the field "category" from my database.
this file is called category.php. I am trying to populate a drop down
box in another page (called add_subpage.php) from the results of the
category page. the code below is on the add_subpage.php file: (It was
my best guess and does not work)

<select name="category">
<option value="CAT"<?php include 'category.php' ?>></option</select>

Can anyone tell me how to make this drop down populate from the
category php file?

Drop Down With Assigned Value From Database
I have a database that has customers in it.  When they purchase things from me, each purchase is either "online" or "onsite". So a selection must be made as either "online" or "onsite" when the item is entered into the database. Often, I have to update this value for an item later on from "online" to "onsite" and vice versa.

Is there anyway to populate the "Type" field with whatever the value is in the datablse for this particular item purchased, then allow someone to select "online" or "onsite" from the dropdown if it needs to be edited? Code:

Adding From Drop Down To Database
i have a script where if you select one of the drop downs, if you have the cash in your credits it will update the database as you having one of them. HOWEVER every time it goes on it gives the player a steak house without clicking on it.

anyone? Code:

2 Drop Down List Where Need Query Database
there is drop down list box linked to the database where it displays the state of a country and once the user clicks on the particular state, there purpose to be radio button displaying the locations available of that state, the location displayed in radio buttons are from the database. currently the source code i'm using is (which uses a submit button to query the database but i does not want the submit button it purpose to work using Code:

Populating A Drop Box With Results From Database
I have a MySQL database with a table (category) with two fields, catId (int) and category (char(50)). What I want to do is to get all category names in this database and place all of them into a dropdown box on a web page so that the user can choose from the list of available categories.

Drop Down Menu Validation Against Database
I want to do a query which selects the config.maps table.field WHERE ladder_id = $ladder_id. I can do this fine, but the next bit is slightly harder.

The maps are stored as an array, separated by commas. I can explode these commas to put the maps in to an array called $maps but how can I then check that a value inputted from the drop down menu matches one of these maps?

I cannot do:

if ($dropdown = $maps[1] || $dropdown = $maps[2] || $dropdown = $maps[3]) {

 // Continue

}

Horizontal Drop Down Menu From Database?
I've been searching now for months and have just given up. I've also tried to create my own menu using pre-made drop down menu software then using dreamweaver to try and get the values from a database but have had no success.

I've made a CMS which allows users to greate sub menu items, and then sub-sub menu items to those submenu items. And now the final thing to do is create the drop down menu on the front end of the site.

Is there a particular site or software package that anyone could point me to that is very good and allows you to create the menu's based on data in a database? So it will allow me to select which table contains the main buttons, which table contains the sub menu items, and also the sub-sub menu items.

Database Driven Drop Down Menu
I'm trying to create a database driven drop down menu. I feel I'm on to the right path but my code doesn't seem to work. I've looked around and haven't seen where I'm making the mistake. Any one care to take a look? Code:

How To Grad Information From Mysql Database With Drop Down Menu's?
i am trying to do is like this website http://www.chippeduk.com/ in the search area (bottom right), where the user selects a make (all fields grab from the database), then selects a model, then they select the fine tune, then they click search this will bring up the information about the car they have chosen. How would i do this, would i use multiple tables and then link them together via an id? i am new to PHP/MySQL but very willing to learn.

Displaying Data From Mysql Database In A Drop Down List On Form.
I'm trying to do is display data from two different mysql tables from the same database in a drop down list on a html form. I have a fixtures table with the player1(userid), player2(userid), gameid, game, score1 and 2, what I want is to use the userid to get the players first name and surname from the members table (as it is a unique id), I need to do this bit before displaying it in the drop down. I think i need 2 querys to do this but when I have tried it it just echo's a blank value or the userid not the forname and surname that I want. I'm using the fetch_array function but just can't see where I'm going wrong, Code:

Drop Down Lists Changing Depending On Other Drop Downs
I want to have a drop down system like this one.  But without the radio buttons.

I want to have 3 drop downs but have no idea how to go about it.  I assume I will need to activate some sort of Javascript on the onChange event of the option drop downs.

Drag Files From One Folder To Another Folder (copy) .. Possible?
Is it possible to write codings PHP or Javascript.. GUI representation
of File handling (ie. Drag files from one folder to another folder (copy)
like our windows).. pls give me some reference codings like this..

Drop Down Box
I have a drop down box that I have coded to have several values. These values are actually snippets for SQL code. how do I make the drop down box display the selection picked by the user after the page is refreshed?

Drop-down X 5
I am trying to populate a drop-down from a database and repeat this drop-down five times. The first drop-down gets populated but the others don't. I tried to reset the array, but I am still new to PHP and not sure if I am doing correct. Code:

Drop Down Box
The purpose of this application: I need 2 combo boxes, one with months, and one with years. When the user chooses both a month and a year, a page is displayed with certain numbers that are retrieved from a database. Those numbers correspond to the specific month and year. For example, January 1998 produce "12", but February 2001 might display "73".

So I guess I'm asking 2 questions. The first is just a general outline of how someone might go about doing this (to see if i'm on the right track in my thinking). The second, and more important question is for someone to please explain to me how do I get the values chosen in the drop down boxes to correspond to specifc fields in a database?

Drop Down Box
i've got a drop down box that is populated by the results of a mysql querie but for some reason it only shows the first word. so if i have the results;

test 1
test 2
test 3

it will just display test, Code:

Drop Down Box Other
Im trying to create a drop down box which at the end has a Other option. If Other is selected I want the variable which is set from the drop down box to be set to whatever is typed in, in the input box below by the user e.g:

<select name="team_name"><option value='' selected disabled>Select Team Name</option>
<option value="1st XI">1st XI</option>
<option value="2nd XI">2nd XI</option>
<option value="3rd XI">3rd XI</option>
<option value="Other>Other</option>
</select>

I dont really want to use Java or AJAX, is there anyway in which this can still be done?

Drop Down Box
I have a couple of drop down boxes which you select the option you want, that value is then stored in the database. If you make a mistake there is an edit option which once clicked shows the form with the information filled in/selected.

However my problem is that when you edit, although the current option which was previously entered into the drop down box is set as the starting value, which is disabled, if you dont change the drop down box the value is deleted rather than held as it hasnt changed. Code:

One Drop Down Box Effecting Another.
I am trying to have one drop down box effected by another drop down box on one page only. I would like a user to select their state from a drop down box, then depending on what state they choose, I would like the list of cities from another drop down box to be displayed that are linked to that state in a mysql database. The purpose is to keep the list of cities to choose from small, they should not have to waid through a list which contains cities in other states.

Drop-down Menus
How can I create drop-down menus in PHP?

Drop Down List
I want to read a directory for available files and then get the filenames and put them in a drop down list. Whatever the user will select will be the value of the variable $selected. I already found the code to read directories: Code:

Selecting From A Drop Down Box
I have a drop down box populated with names of towns from my db (MySQL) all that is working fine. My problem is I do not know how I select a town in the box and have it take me to that web page on my site.

Drop Down Menu(add Cat)
I have DB to add category and forum to edit the terms that in the cat so I add this code in the edit forum to change the cat of the term by choose the cat from drop down menu
PHP Code:

How To Get Value From Drop Down Box To E-mail With Php
I have a form that includes a drop down box. I can get all of the other
values to show up in an e-mail except for the drop down box values. Can
someone please help? -- I know the HTML isn't the greatest. The website
was originally created in FrontPage and the form broke. I'm just trying
to help out and fix it for a friend.

sendmail.php ....

PHP And Drop Down Menus
I've looked through the forum rather extensively and my qestion is similiar to the question by Brian_F and answer by "saintaw" a couple of days ago in this forum. I already have a functional page that has several dynamic drop-down menus from which the user selects a topic of interest.

My question is how to reference their choice from the drop down menus in order to display the results of their choice. I would like the user to be able to choose a subcategory with one of the drop down menus and then be able to view the questions related to that subcategory.

I currently have a nested for loop which displays the categories and subsequent drop-down menus for each category, and I'm using PHP and MySQL to do the dirty work. code:

Drop Downs
trying to get dropdowns to appear and getting no where! I have a script with a config file that has a list of options. I have added a list of ages like so:

$age[0]= 18;
$age[1]= 19;
$age[2]= 20;

I now want to include these in a page in a drop down menu and have tried this code :

$ageshow .= "<option>$age</option>";
echo "<tr bgcolor =$bg2>";
echo "<td class="classadd1"><div class="maininputleft">Age:</div></td>";
echo "<td class="classadd2"><select name="in[sfield]">";
echo "$ageshow</select> ";
echo "</td>";
echo "</tr>";

this does not list the ages but just has array in the drop down. What am I doing wrong?

Php And Drop Down List
I am coding an email form on a site. A user enters their name and contact email and then selects from a drop down list to which particular email the message should be sent: User1, User2, User3. Then the user types out a message and hits submit. My problem is that I am unsure as to how to grab the selection in the drop down list and pull the selection and place it like this: "$selection@domain.com". Here is the php code:

Drop Down Menu
I have a page that uses php to look up specific fields in a specific table of a specific database based on the username. Using this, it creates a dropdown list of information belonging to that user. The fields in question each have 13 pieces of data. Based on what they click in the dropdown box, I need that specific data to pass onto hidden fields on the page. Code:

PHP-MySQL Drop-Down Box
I'm using PHP to dynamically make a drop down box of users in a table. The first row is displayed with all the users. However, on the second row non of the users are listed in the drop down box. It only works on the first.

Drop Down Menu
I'm struggling to get this to work. It is suppose to show only $name and not $name and $email PHP Code:

Drop Down Menu
I am implementing a website with dreamweaver. I dont know much about
programming but I can handle scripts and manupilate.

does anyone know a website that i can get a free drop down menu script
to use on the website's navigation?

Drop Down Menu
I have 2 drop down boxes on my site. I want the selection of the
first one to populate the second box.

Extended Drop Down
I've picked up some scripts from this forum regarding drop down lists (thanx!), and now I'm wondering if anyone can explain to me how to do the following:

Table:
+---+-----+
|ID |NAME |
+---+-----+
|1 |name1|
|2 |name2|
|3 |name3|
+---+-----+

I fetch values from NAME to a drop down list without problems. Then I want to select the corresponding ID (depending on which NAME-value I've selected) into a hidden(?) field to use later on in a submit.php page which is sent to another table in the db.

Extracting Value From A Drop Down Box
I am having problems extracting the values from a drop down box and based on the value obtained there are some operation done. Code:

Drop Down Menu
What i would like to do is look in a file and see what the name's of the files are in there and have them put in to a drop down menu. Dose some one know of a tutorial on this or how to do it?

Drop Down Menu
I have a problem with a drop down menu, I have 2 drop down menu's if 1 select in dropdown menu 1 a catagorie then I must give this to menu 2 and then there must be things in menu to with catagorie from menu 1 I just want when I clicked menu 1 the php file refreshed en gives the catagorie with the refreshed file but HOW?

Drop Down Lists
I have a drop down list with the town options 'Bury' and 'Ipswich' as
shown below.

When selecting one of the options, its value is passed to variable
$townsearch.

How do I change the drop down list so the option selected last time is
then the current one shown in the drop down box?

<body>

<?php $townsearch = $_get['town']; ?>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">

<select size="1" name="town">

<option>ipswich</option>
<option>bury</option>
&nbsp;
</select>&nbsp;

<input type="submit" value="GO" />

</form>

Php And Drop Down Menus
I have a question about PHP and drop down menus. Should I be using PHP for my drop down menus or should I be using java script? I have a whole contact form that is programmed in PHP, but I have never done a drop down menu with PHP, is this possible? If anyone knows of any great drop down menu tutorials in PHP.

Drop Down Filter
I've got two drop down menus that I'm using to filter some data. It works when the user selects an option from both menus but always return ZERO records when only one of out the two menus have been set. My code POSTS the ID from each menu then puts that ID into the WHERE clause of an SQL query. Code:

Drop Down Select
I am working on a small script to load all members names into a drop down list, this I have acheived so far. What i'm looking to do is make this so that when I select a name from the list I have a submit button which opens up a member edit form which I have created. Code:

Drop Down Menu?
Im looking for a script for a site im making that will make a drop down menu which I can customise the color of. Simple, like a border and background color, but is friendly with all types of IE explorer.

Drop Down Box To A List Box
i have this drop down box that displays the relevant info from the table that its loading. But the drop down box isn't quite so wise to use if there hundreds of rows. So what i wanted to do was change it to a list box instead ... would any one know how to do that? Code:

Auto Drop Down Box
I need to create an auto drop down box. For example I already have a list of states that are pulled from the database. When the user selects a state, a drop down box below should populate with the cities from that state. (that's where I'm having trouble)

This is a search form so the results have to reflect what city and state they chose. (along with some other criteria)

I've searched all evening for instructions on how to do this and so far I've only seen javascript that you put directly in the code. If I have all 50 states along with their related cities that's an awful lot of code to put in the page.

Isn't there a way to automatically pull the cities from the database to populate the box when the user clicks a state? I have no idea where to start to make that work.

Drop Down Menu
I am using the following code to loop 12 months backwards from the current month in a drop down list - using the get method.

I'm having difficulties trying to get the option selected once I have submitted the form.  For example, I am using this to filter months, so once a month has been selected and submitted, the first option in my drop down list is displayed and not the one that was selected and submitted. So basically, I need to be able to select a month > hit submit and when the form returns, have the drop down list show me the selected item. Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved