[jQuery] Re: Jquery Save Layout

2009-02-02 Thread Stephan Veigl

You have to transmit (HTTP post) the HTML string to your php files.
You can do this either with AJAX or put the string into a hidden input
field and do an ordinary user submit.

AJAX could look something like:
  $.post("your.php", { 'html': $("#root").html() });

In the PHP file you can read the data with:
  $html = $_POST['html'];

for more details see:
http://docs.jquery.com/Ajax

by(e)
Stephan


2009/2/2 Chris Owen :
> Sorry,
>
> Got it working, was missing the div's.
>
> How can I get to this value from php so that I can connect to my database?
>
> Many Thanks
>
> Chris.
>
> On Mon, Feb 2, 2009 at 4:48 PM, Chris Owen  wrote:
>>
>> Hi Stephan
>>
>> I have tried this and when I click my button I get null.
>>
>> Guess I am calling the button incorrectly ?
>>
>> Many Thanks
>>
>> Chris.
>>
>> On Mon, Feb 2, 2009 at 4:23 PM, Stephan Veigl 
>> wrote:
>>>
>>> Saving $("#root_element").html() to your DB should do the job.
>>>
>>> see a little demo: http://jsbin.com/uwujo/edit
>>>
>>> by(e)
>>> Stephan
>>>
>>>
>>> 2009/2/2 Chris Owen :
>>> > Hey,
>>> >
>>> > I have been trying for about a week now to be able to save the layout
>>> > of my
>>> > page, I am using sortable, dragable etc so that my users can create
>>> > there
>>> > own layout.
>>> >
>>> > I need away to save this layout either to a cookie or to a database so
>>> > that
>>> > I can reload there layout when they come back.
>>> >
>>> > Many Thanks
>>> >
>>> > Chris.
>>> >
>>
>
>


[jQuery] Re: Jquery Save Layout

2009-02-02 Thread Chris Owen
Sorry,

Got it working, was missing the div's.

How can I get to this value from php so that I can connect to my database?

Many Thanks

Chris.

On Mon, Feb 2, 2009 at 4:48 PM, Chris Owen  wrote:

> Hi Stephan
>
> I have tried this and when I click my button I get null.
>
> Guess I am calling the button incorrectly ?
>
> Many Thanks
>
> Chris.
>
>
> On Mon, Feb 2, 2009 at 4:23 PM, Stephan Veigl wrote:
>
>>
>> Saving $("#root_element").html() to your DB should do the job.
>>
>> see a little demo: http://jsbin.com/uwujo/edit
>>
>> by(e)
>> Stephan
>>
>>
>> 2009/2/2 Chris Owen :
>> > Hey,
>> >
>> > I have been trying for about a week now to be able to save the layout of
>> my
>> > page, I am using sortable, dragable etc so that my users can create
>> there
>> > own layout.
>> >
>> > I need away to save this layout either to a cookie or to a database so
>> that
>> > I can reload there layout when they come back.
>> >
>> > Many Thanks
>> >
>> > Chris.
>> >
>>
>
>


[jQuery] Re: Jquery Save Layout

2009-02-02 Thread Chris Owen
Hi Stephan

I have tried this and when I click my button I get null.

Guess I am calling the button incorrectly ?

Many Thanks

Chris.

On Mon, Feb 2, 2009 at 4:23 PM, Stephan Veigl wrote:

>
> Saving $("#root_element").html() to your DB should do the job.
>
> see a little demo: http://jsbin.com/uwujo/edit
>
> by(e)
> Stephan
>
>
> 2009/2/2 Chris Owen :
> > Hey,
> >
> > I have been trying for about a week now to be able to save the layout of
> my
> > page, I am using sortable, dragable etc so that my users can create there
> > own layout.
> >
> > I need away to save this layout either to a cookie or to a database so
> that
> > I can reload there layout when they come back.
> >
> > Many Thanks
> >
> > Chris.
> >
>


[jQuery] Re: Jquery Save Layout

2009-02-02 Thread Stephan Veigl

Saving $("#root_element").html() to your DB should do the job.

see a little demo: http://jsbin.com/uwujo/edit

by(e)
Stephan


2009/2/2 Chris Owen :
> Hey,
>
> I have been trying for about a week now to be able to save the layout of my
> page, I am using sortable, dragable etc so that my users can create there
> own layout.
>
> I need away to save this layout either to a cookie or to a database so that
> I can reload there layout when they come back.
>
> Many Thanks
>
> Chris.
>