close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

where should framework builder function to be called on success reside

Thread began 1/24/2023 2:00 pm by asarcona308398 | Last modified 1/29/2023 12:28 pm by asarcona308398 | 316 views | 10 replies

asarcona308398

Hey Ray

It seems I might be taking shortcuts in my development process!

If I move the script to the main page I get this error in DevTools:

Uncaught TypeError: Cannot read properties of null (reading 'length') Menu_dev.php:1012
at intervals (Menu_dev.php:1012:25)
at Menu_dev.php:1016:25

this is from the called script which is using a php variables for time, I would hope they're available as the script runs after php!
I am still keeping the element used in the script on the plugin page here though.
If I move that element to the main page, the script acts on the element on the main page load, and no errors!
if I then call the onClick event to bring in the plugin page with the element on plugin instead, the plugin page shows an empty element, a selectbox in this case.

I'm thinking it might be a DOM issue when the page loads and the script having to reside on the main page
really can't access the plugin page because when the script and element are on plugin page it breaks??

I've run a simple function like:

<p id="demo"></p>

<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
</script>

and it works.. loading "demo" on the main page before the modal that I call with onClick loads the plugin page.. I get the same results if I try to get that to run on the plugin page...it don't seem to write to the plugin page.

I'm thinking I may have to plugin to the plugin page the script, then plugin that page to the main page...if that makes any sense!

I've attached the files with the 'intervals' script on the main page and the element on the plugin page that will produce the error and blank selectbox,
the DB file as well.


Just a note... when adding the name intervals in Load toDiv wizard, it puts it in '' and it wont work.... your suggestion of removing them on the onClick event
does enable the script to go further.

If you find time to look I will be available...

I think a session may be best to see what is going on...

Let me know..

All the best

Tony

Attached Files
Menu_dev.zip
openclosed.zip
storehours.sql

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