Jump to content

how to set w3-include-html value dynamically


Recommended Posts

My hard-coded <div w3-include-html="source.html"></div>  works fine.  However, I want to make it easy for an administrator to change from say, "source.html" to "source2.html".  

My script would read member "currentSource.txt", which would include simply "source2".

How can I dynamically create a DIV using HTML DOM that is <div w3-include-html="source2.html'></div>? 

The parameter within the <div, i.e. w3-include-html="source2.html' is not inner.HTML.  it is inner div. I'm not sure this is possible.

I can include an include where "currentSource.html" is the entire div, i.e. <div w3-include-html='source2.html'></div>.  An administrator could alter that member.  I'm trying to simplify it to the most minimum data.

At the time of this writing, the HTML5 import function is deprecated.

Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...