Advertisement

Refresh content in another pane.

Moderators: Calcifer, slothy

Refresh content in another pane.

Postby tmcdonnell » Tue Mar 11, 2008 4:20 pm

Hi,

I have a shopping cart, the center pane shows items, the right pane the shopping cart.

I use a submit button on the center pane to add to cart, and change the mysql to reflect the users money deduction.

The right pane shows the amount of money a user has, but when they buy somethng, it does not refresh to show the new amount.

How can I get a button action on the center pane to update/refresh the right pane?

<input type=submit paneSplitter.reloadContent('eastPane');
value=".$lang_shop["purc"].">");


??
tmcdonnell
 
Posts: 8
Joined: Tue Aug 28, 2007 11:51 pm

Postby lking79 » Tue Mar 11, 2008 4:34 pm

Hi,

Well I use the DHTMLSuite.form to submit the form content (e. g. in the center pane). My right pane automatically refreshes after 5 seconds...

If you don't want this solution, use

paneSplitter.reloadContent('id_of_content')

at the top of your center pane page to reload the content of your "right" pane, assuming your center pane submits the form to itself.
lking79
 
Posts: 118
Joined: Sun Jun 10, 2007 6:48 pm
Location: Geneva

Postby tmcdonnell » Tue Mar 11, 2008 6:28 pm

Thanks for your reply.

The center page is php and I am daft or something, but I cannot get the calls to work on the page with a php extension.

Even if I add <head> and <body> and the javascript includes at the top, when I call:

paneSplitter.reloadContent('id_of_content')

Nothing happens.

I am sure it is my coding that is wrong, please can you show me an example of the code for a php page.

Thanks
tmcdonnell
 
Posts: 8
Joined: Tue Aug 28, 2007 11:51 pm

Postby lking79 » Wed Mar 12, 2008 7:33 am

Hi,

I use PHP pages as well.

To reload a pane, you need its ID. For example, my pane on the west panel is called 'basket', so you need

<script>paneSplitter.reloadContent('basket');</script>

Try this. And it doesn't need to be in the <head>, can be anywhere in your page.
lking79
 
Posts: 118
Joined: Sun Jun 10, 2007 6:48 pm
Location: Geneva


Return to General questions

Who is online

Users browsing this forum: No registered users and 7 guests

cron