close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Framework's Load plugin to div

Thread began 3/08/2023 7:29 am by asarcona308398 | Last modified 3/13/2023 3:19 pm by asarcona308398 | 219 views | 6 replies

asarcona308398

Hey Ray..

I think I may have solved the redirect back to the Dashboard....sort of...

I am setting a session variable of -- $_SESSION[ 'pageID' ] on the plugged-in page, lets say an Insert to DB page for example, then configuring the $InsertGoTo = "../dashboard.php"; to go back to the dashboard, then on the dashboard page the <body> element is in an 'if' statement as such:

<?php

if ((isset( $_SESSION[ 'pageID' ])) == "productcategories_insert.php" ) {

echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";

} else {


echo "<body onLoad="."framework_load_plugin_url('plugins/DashboardMain.php',false,'main','../',false,dashboard);return document.MM_returnValue".">";

}

?>

the 'if' statement would load the default dashboard <div> if the plugin page's session variable is not set.

on the dashboard page I start the session at the top of the page as usual... but then clear the plugin page's set session variable at the bottom of the page.. seems to be working.


Then if I refresh the dashboard page the session variable that is no longer available, defaults to the DashboardMain plugin.

Not sure if this is best method, but it does work.

This would also have to be done with the $UpdateGoTo , as well as the $DeleteGoTo covering ALL the re-directs.

Let me know if I'm on the right track, and when you have time and are feeling up to it I would still be up for that session.

Hope you are doing well with your treatments.

All the Best,

Tony



====================
====== UPDATE ======
====================

dashboard.php modifications that work!!

<?php
@session_start();
?>
... at top of page


After putting a switch/case in the dashboard.php file as such...


<?php

$page = ((isset( $_SESSION[ 'pageID' ])) ? $_SESSION['pageID'] : "");

switch ($page) {

case "productcategories_insert.php":
echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";

case "productcategories_update.php":
echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";

case "productcategories_details.php":
echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";

case "productcategories_results.php":
echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";

default: echo "<body onLoad="."framework_load_plugin_url('plugins/DashboardMain.php',false,'main','../',false,dashboard);return document.MM_returnValue".">";

}
?>

..and at the bottom:

<?php
@session_start();
if (true){
// WA_ClearSession
$clearAll = FALSE;
$clearThese = explode(",","pageID");
if($clearAll){
foreach ($_SESSION as $key => $value){
unset($_SESSION[$key]);
}
}
else{
foreach($clearThese as $value){
unset($_SESSION[$value]);
}
}
}
?>

and then on all DataAssist pages ...


$SESSION variableon all DataAssist pages corresponding to it's name:

<?php
@session_start();
if(!isset($_SESSION["pageID"])) {
$_SESSION["pageID"] = "productcategories_detail.php";
}
?>
for productcategories_detail.php...

<?php
@session_start();
if(!isset($_SESSION["pageID"])) {
$_SESSION["pageID"] = "productcategories_insert.php";
}
?>
for productcategories_insert.php...

<?php
@session_start();
if(!isset($_SESSION["pageID"])) {
$_SESSION["pageID"] = "productcategories_results.php";
}
?>
for productcategories_results.php...


<?php
@session_start();
if(!isset($_SESSION["pageID"])) {
$_SESSION["pageID"] = "productcategories_update.php";
}
?>
for productcategories_update.php...



$InsertGoTo = "../dashboard.php"; -- on ***_insert.php

$UpdateGoTo = "../dashboard.php"; -- on ***_update.php

$DeleteGoTo = "../dashboard.php"; -- on ***_detail.php, and on ***_results.php ... wherever I had a Delete button!

Ray if you have an idea for a better implementation let me know...

Tony

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...