close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Need help debugging an issue with Load Plugin To Div Behaviour

Thread began 9/01/2016 7:59 am by Dave Buchholz | Last modified 9/01/2016 2:18 pm by Ray Borduin | 69 views | 2 replies |

Dave BuchholzBeta Tester

Need help debugging an issue with Load Plugin To Div Behaviour

So I have a page which I load a page into a div via the regular static plugin like so:

<?php
if("" == ""){
$WA_display_quote_1472681007248 = new WA_Include("display-quote.php");
require($WA_display_quote_1472681007248->BaseName);
$WA_display_quote_1472681007248->Initialize(true);
}
?>

and this works fine but when I try to replace the content of the div on form submit (within a jQuery function) like so:
$('#frmModelAdd').on('submit', function(e){

// prevent default form submission
e.preventDefault();

framework_load_plugin_url('plugins/display-quote.php',false,'displayQuote','../../../../','');return document.MM_returnValue;

});

I get the following error message:

Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /Users/davidbuchholz/Sites/*********/webassist/framework/ajax_wrapper.php on line 22
Framework file not found: _plugins/site-pages/public/sales-plus-pages/display-quote.php

The site uses pretty URL's so the actual URL of the page is formatted like so:
http://sitename/salesplustools/create-quote/

I am assuming this is a path issue and I have tried changing the "../../../../" portion of the code without any success.

I will put the files online shortly and include links etc. in a private message.

Sign in to reply to this post

Ray BorduinWebAssist

The mod rewrite is throwing it off. When the url displayed doesn't match the actual path to the file you have to use a <base> tag to tell the ajax what the actual base page is.

I've added that to the index page with:

php:
<base href="http://<?php echo($_SERVER['SERVER_NAME']); ?><?php echo($_SERVER['PHP_SELF']); ?>">



That appears to have fixed the problem.

Sign in to reply to this post

Dave BuchholzBeta Tester

wonderful, thanks Ray

I didn't know about the base tag trick so I will store that in my knowledge base

Sign in to reply to this post

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...