Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Help connecting 2 pages.
Old 12-14-2005, 09:04 PM Help connecting 2 pages.
Webmaster Talker

Posts: 626
Trades: 0
I have a page "viewclient.php" when this page upens there are 6 buttons... One is "Insert Note": When this button is clicked I want to open a new window on top, once the info is entered and "Save" is clicked I want the window to disappear and the original page to refresh itself to update the inserted note.

Can anyone help me with this??
jim.thornton is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-15-2005, 08:27 AM
Skilled Talker

Posts: 70
Trades: 0
i would suggest using JavaScript for this one. i wanted to try something like that but as far as i can tell, it only really works with links not buttons. as for the java, i'm not very good (been trying to stick to PHP).
cerebro89 is offline
Reply With Quote
View Public Profile
 
Old 12-15-2005, 09:35 AM
madkad's Avatar
madkad-hosting.com

Posts: 310
Location: UK
Trades: 0
you could do a php popup page were when the button is click a page opens like a popup the it can have a feild on were the msg is typed in then click button save that button would have to add the text to a database then clocse the window and some how make the window that was first used refresh then it can collect the info from the database to show it

sounds like alot of work for a msg to show
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Great Hosting For You
madkad is offline
Reply With Quote
View Public Profile Visit madkad's homepage!
 
Old 12-15-2005, 09:46 AM
Skilled Talker

Posts: 70
Trades: 0
try using a wizard-based interface and use sessions to collect and process the data. that would be the easiest way of doing things.
cerebro89 is offline
Reply With Quote
View Public Profile
 
Old 12-15-2005, 10:58 AM
Webmaster Talker

Posts: 626
Trades: 0
would you be able to show a quick little example of how to use a session for this? I have never used sessions before.

Thanks.
jim.thornton is offline
Reply With Quote
View Public Profile
 
Old 12-26-2005, 07:54 AM
Skilled Talker

Posts: 70
Trades: 0
first off start the session by using the code below. This code MUST be placed at the very top of the page and MUST be present in every page you use to collect/present data.
PHP Code:
session_start(); // starts the session
header("Cache-control: private"); // fix for IE 6 
For the wizard process, you will need to use headers to redirect the user to the required pages. Using conditional statements will be the best way to go.
PHP Code:
if(isset($newnote)) {
header("Location: newnote.php")

Then just use HTML or PHP to display a text box and press another button to return to the original page with the data intact i.e. using an echo statement.

To destroy the session, use the following code:
PHP Code:
$_SESSION = array();
session_destroy();
header("Location: http://www.mydomain.com/"); 

Last edited by cerebro89; 12-26-2005 at 07:56 AM..
cerebro89 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help connecting 2 pages.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18243 seconds with 12 queries