Jump to content

How do they do it???


raydenl

Recommended Posts

Hi,

 

I have am in the process of creating a PHP shopping cart admin site for our custome Flash based e-commerce website. I have found this demo admin site that I am using to give me ideas:

 

Username:admin, Password:admin

 

http://www.cartweaver.com/demos/php/basic/cw2/Admin/AdminHome.php

 

I am wondering how they do their POSTBACKS.

 

For instance if you go to their: Store Settings -> Admin Users, and add a new user then click the back button you go back to the page before the Admin Users page... it's as if the page didn't refresh... but it did... I've looked at the HTML and the Add button definately does a "submit".

 

When ever I try this after I have submited, if I click the back button I end up at the same page... which is what I would expect.

 

Any ideas on what's going on with their code???

 

 

 

 

Link to comment
Share on other sites

Ummmm... PHP's a server side language... and I don't think they would be too happy to give me their source code...

 

I have studied the HTML and they use a "submit" button with a form action equal to the name of the page, i.e. it's just doing a POSTBACK... which is exactly what I am doing

Link to comment
Share on other sites

Yeah it renders the table by refreshing the page right... so you would expect the back button to take you back to the same page before the refresh... which is what my code does... but if you click the back button on theirs it takes you to the page you were on before 'Admin User'

Link to comment
Share on other sites

This is as clear as I can be:

 

1) Go to the site: http://www.cartweaver.com/demos/php/basic/cw2/Admin/AdminHome.php

 

2) Enter username: admin, password: admin

 

3) Go to Store Settings -> Admin Users

 

4) Add a new user

 

5) Click "ADD"

 

6) Table renders, now Click your browser back button

 

7) You will now be at "Admin Home", not "Admin Users"

 

My problem is: with my code, when I click the back button after adding a user I end up back at "Admin Users" with blank fields.

 

 

 

Link to comment
Share on other sites

When you add the new user, it doesn't seem to be submitting the form to a new page, the current page is just altered with javascript.  Therefore you have the same problem as with many ajax applications - it breaks the back button.

 

I checked out their javascript files and they have some very dense looking code there - probably mostly for controlling the drop down menu on the left but it also probably captures the form submit event and just js processes it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.