Auto Action HTML

8 years 5 months ago #272950 by krileon
Replied by krileon on topic Auto Action HTML

How do I combine both HTML and JS in a single code? Do I need to write another action?

A code action can have more than 1 code output. Have 1 as HTML to output the HTML. Then have another as Javascript to add your JS. This can all be done in a single auto action by clicking the + to the far right of the code action parameters.

I got this to work but somehow when I add the print I am unable to print. Do I need to add other codes?

You can't exclusively print a modal window. A modal window is just a floating div on top of the page. Printing doesn't work that way. You need to be loading in a new window entirely or the contents needs to be in an iframe with a print link directly in the iframe contents.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: edmundcheong

Please Log in to join the conversation.

8 years 5 months ago #272989 by edmundcheong
Replied by edmundcheong on topic Auto Action HTML

krileon wrote:

How do I combine both HTML and JS in a single code? Do I need to write another action?

A code action can have more than 1 code output. Have 1 as HTML to output the HTML. Then have another as Javascript to add your JS. This can all be done in a single auto action by clicking the + to the far right of the code action parameters.


Does the css, html, js need to be in proper sequence? Meaning html first, js second and css third?

Please Log in to join the conversation.

8 years 5 months ago #273007 by krileon
Replied by krileon on topic Auto Action HTML
Shouldn't matter what order you put them in. Your alternative is to just use a single HTML code block and provide the valid inline HTML.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: edmundcheong

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.228 seconds