how do i append an image to a dom element using javascript

11 views
Skip to first unread message

fugee ohu

unread,
Jan 29, 2020, 12:18:43 AM1/29/20
to Ruby on Rails: Talk
how do i append an image to a dom element using javascript

Walter Lee Davis

unread,
Jan 29, 2020, 8:18:28 AM1/29/20
to rubyonra...@googlegroups.com
https://lmgtfy.com/?q=how+do+i+append+an+image+to+a+dom+element+using+javascript

> On Jan 29, 2020, at 12:18 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> how do i append an image to a dom element using javascript
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a3f1366c-1bbb-4363-8a06-65b538719a32%40googlegroups.com.

fugee ohu

unread,
Jan 29, 2020, 11:06:25 AM1/29/20
to Ruby on Rails: Talk


On Wednesday, January 29, 2020 at 8:18:28 AM UTC-5, Walter Lee Davis wrote:
https://lmgtfy.com/?q=how+do+i+append+an+image+to+a+dom+element+using+javascript

> On Jan 29, 2020, at 12:18 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> how do i append an image to a dom element using javascript
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.

Thanks I'm trying to write an action cable chat app Eventually I want it to include video but for now I've got text working but I don't have images working yet Do all action cable chat solutions rely on javascript (?) because I notice there's an app/channels folder and an app/javascript/channels folder Does that mean I don't need to be using javascript?

Ariel Juodziukynas

unread,
Jan 29, 2020, 11:28:49 AM1/29/20
to rubyonra...@googlegroups.com
The client part requires javascript, the backend part requires no javascript, I strongly recommend you read this https://guides.rubyonrails.org/action_cable_overview.html

Sometimes it looks like you just ask questions without reading about the subject you try to use. The official guide shows you what file goes where.

To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62555a89-a69e-485b-8117-f17394a5b676%40googlegroups.com.

fugee ohu

unread,
Jan 29, 2020, 1:00:31 PM1/29/20
to Ruby on Rails: Talk


On Wednesday, January 29, 2020 at 11:28:49 AM UTC-5, Ariel Juodziukynas wrote:
The client part requires javascript, the backend part requires no javascript, I strongly recommend you read this https://guides.rubyonrails.org/action_cable_overview.html

Sometimes it looks like you just ask questions without reading about the subject you try to use. The official guide shows you what file goes where.

El mié., 29 ene. 2020 a las 13:08, fugee ohu (<fuge...@gmail.com>) escribió:


On Wednesday, January 29, 2020 at 8:18:28 AM UTC-5, Walter Lee Davis wrote:
https://lmgtfy.com/?q=how+do+i+append+an+image+to+a+dom+element+using+javascript

> On Jan 29, 2020, at 12:18 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> how do i append an image to a dom element using javascript
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a3f1366c-1bbb-4363-8a06-65b538719a32%40googlegroups.com.

Thanks I'm trying to write an action cable chat app Eventually I want it to include video but for now I've got text working but I don't have images working yet Do all action cable chat solutions rely on javascript (?) because I notice there's an app/channels folder and an app/javascript/channels folder Does that mean I don't need to be using javascript?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.

Yes Thanks I'll read that I've been reading active storage overview trying to work out a better understanding of the attachment/s object how to render attachments because I'm having trouble with it
Reply all
Reply to author
Forward
0 new messages