Have browser render POST response CSS

37 views
Skip to first unread message

Sky Richardson

unread,
Feb 12, 2020, 8:53:29 AM2/12/20
to intercooler-js
intercooler-js is awesome!

Using ic-post-to 
<form id="proposed-{{ publication.id }}" ic-post-to="admin.php" ic-target="#admin-alert-{{ publication.id }}">

I receive the following response to a target div
<div class="/&quot;alert" alert-info="" alert-dismissible="" fade="" show="" "="" role="/&quot;alert/&quot;">
      Saved.
     
<button type="/&quot;button/&quot;" class="/&quot;close/&quot;" data-dismiss="/&quot;alert/&quot;" aria-label="/&quot;Close/&quot;">
       
<span aria-hidden="/&quot;true/&quot;">×</span>
     
</button>
</div>

Any suggestions on how to get the browser to render the css? Perhaps ic-on-complete and a jQuery function to re-render the element?

-sky

Justin T. Sampson

unread,
Feb 12, 2020, 11:04:57 AM2/12/20
to Sky Richardson, intercooler-js
Hi Sky,

I would generally expect the CSS to be applied automatically. What style do you expect to be applied, and what do you see happening instead?

The HTML snippet that you included in your email contains some weird "/&quot;" character sequences that probably shouldn't be there. Was that just a pasting accident, or are those somehow coming from the actual HTML that the server is returning?

Cheers,
Justin

--
You received this message because you are subscribed to the Google Groups "intercooler-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intercooler-j...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/intercooler-js/e01ebcad-2e47-4f2a-8731-edb633577bfc%40googlegroups.com.

Sky Richardson

unread,
Feb 12, 2020, 7:36:06 PM2/12/20
to intercooler-js
Good catch Justin

I had added forwardslashes not backslashes to escape the double quotes in the fragment which I fixed.
I used php string function stripslashes(str) to strip the backslashes. 

The html and css renders correctly now. Thanks mate 

On Thursday, February 13, 2020 at 3:04:57 AM UTC+11, Justin Sampson wrote:
Hi Sky,

I would generally expect the CSS to be applied automatically. What style do you expect to be applied, and what do you see happening instead?

The HTML snippet that you included in your email contains some weird "/&quot;" character sequences that probably shouldn't be there. Was that just a pasting accident, or are those somehow coming from the actual HTML that the server is returning?

Cheers,
Justin

On Wed, Feb 12, 2020 at 5:53 AM Sky Richardson <skyr...@gmail.com> wrote:
intercooler-js is awesome!

Using ic-post-to 
<form id="proposed-{{ publication.id }}" ic-post-to="admin.php" ic-target="#admin-alert-{{ publication.id }}">

I receive the following response to a target div
<div class="/&quot;alert" alert-info="" alert-dismissible="" fade="" show="" "="" role="/&quot;alert/&quot;">
      Saved.
     
<button type="/&quot;button/&quot;" class="/&quot;close/&quot;" data-dismiss="/&quot;alert/&quot;" aria-label="/&quot;Close/&quot;">
       
<span aria-hidden="/&quot;true/&quot;">×</span>
     
</button>
</div>

Any suggestions on how to get the browser to render the css? Perhaps ic-on-complete and a jQuery function to re-render the element?

-sky

--
You received this message because you are subscribed to the Google Groups "intercooler-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to interco...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages