[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4284: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4286: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4288: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
www.dhtmlgoodies.com • View topic - Drag and drop to columns - How do i get it to save?
Advertisement

Drag and drop to columns - How do i get it to save?

Moderators: Calcifer, slothy

Drag and drop to columns - How do i get it to save?

Postby Gewain » Fri Mar 09, 2007 1:28 pm

I've read the example and i still dont understand how this is made, guess im not that smart :?

The example says:

1. Create a form with a hidden form field: example:
<form name="myForm" method="post" action="save.html" onsubmit="saveDragDropNodes()">
<input type="hidden" name="listOfItems" value="">
<input type="submit" value="Save" name="saveButton">
</form>
2. Update the hidden form field with this line at the bottom of the saveDragDropNodes function:
document.forms['myForm'].listOfItems.value = saveString;

Any kind person mind explaining to me how this is done? Would be most grateful!

Got a website with MySQL and PHP support and it would be great to have it working !

// Gewain
Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Gewain » Mon Mar 12, 2007 8:24 am

Lets say my username is gewain and my pw is gewain2 do i have to start with the following to connect to my database ( named gewain too )?

mysql_connect('localhost', 'gewain', 'gewain2');
mysql_select_db('gewain');

Would be most grateful for help with this .. :wink:
Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Gewain » Mon Mar 12, 2007 8:47 am

K i have tried to fix first part and it looks like this now:

1. Now reads:

<div id="footer">
<form name="myForm" method="post" action="save.html" onsubmit="saveDragDropNodes()">
<input type="hidden" name="listOfItems" value="">
<input type="submit" value="Spara" name="savebutton">
</form>
</div>

2. Now reads:

/*
Preparing data to be saved
*/
function saveDragDropNodes()
{
var saveString = "";
var uls = dragDropTopContainer.getElementsByTagName('UL');
for(var no=0;no<uls.length;no++){ // LOoping through all <ul>
var lis = uls[no].getElementsByTagName('LI');
for(var no2=0;no2<lis.length;no2++){
if(saveString.length>0)saveString = saveString + ";";
saveString = saveString + uls[no].id + '|' + lis[no2].id;
}
}

document.forms['myForm'].listOfItems.value = saveString;

}

-----------------

Can anyone confirm if this is right or wrong? :wink:

The only thing that happens now is that i get a "server not found" msg.
Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Gewain » Mon Mar 12, 2007 10:43 am

Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Batalf » Mon Mar 12, 2007 11:44 am

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Gewain » Mon Mar 12, 2007 1:19 pm

Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Batalf » Mon Mar 12, 2007 4:23 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Gewain » Tue Mar 13, 2007 7:42 am

Thanx for the answer mate :)

Kind of lost how this last bit is gonna be, still struggling with HTTP 405 so im kinda stuck atm .. :?

There isnt any way to explode the output directly into the database so i dont need to dump to save.html first?
Last edited by Gewain on Tue Mar 13, 2007 9:02 am, edited 1 time in total.
Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Gewain » Tue Mar 13, 2007 9:02 am

Last edited by Gewain on Tue Mar 13, 2007 1:28 pm, edited 4 times in total.
Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Gewain » Tue Mar 13, 2007 10:44 am

Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Gewain » Wed Mar 14, 2007 7:33 am

Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Gewain » Wed Mar 14, 2007 12:41 pm

I give up, tried everything i can think of ...
Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Batalf » Wed Mar 14, 2007 12:44 pm

Hi

What do you expect to see in save.php ?

The save routine doesn't output any data, it is only suppose to save the nodes.
Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Gewain » Wed Mar 14, 2007 2:17 pm

Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am

Postby Gewain » Wed Mar 14, 2007 3:37 pm

Gewain
 
Posts: 12
Joined: Fri Mar 09, 2007 9:11 am


Return to Drag and drop scripts

Who is online

Users browsing this forum: No registered users and 7 guests

cron