Hi guys, Could you give me a sample or link for creating embedding code in ruby on rails? Thanks, Yudi Soesanto -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yudi Soesanto wrote:> Hi guys, > > Could you give me a sample or link for creating embedding code in ruby > on > rails?What do you mean by "embedding code"?> > Thanks, > Yudi Soesanto-- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Sent from my iPhone -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
What I am trying to do is: I creating a survey website. User can register to create a survey and this survey can be embedded to other site with providing embedded script. The problem I have, I don''t know how to create embedded code via ruby on rails. I never done this. Please help!!! Thanks, Ys Marnen Laibow-Koser wrote:> Yudi Soesanto wrote: >> Hi guys, >> >> Could you give me a sample or link for creating embedding code in ruby >> on >> rails? > > What do you mean by "embedding code"? > >> >> Thanks, >> Yudi Soesanto > > > > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > Sent from my iPhone-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 09 Jun 2010, at 08:57, Yudi Soesanto wrote:> What I am trying to do is: I creating a survey website. User can > register to create a survey and this survey can be embedded to other > site with providing embedded script. The problem I have, I don''t know > how to create embedded code via ruby on rails. I never done this.Your embed code should be something alone the lines of: <script> steps to write in javascript: - Inject iFrame into the page - Load survey url into the iFrame </script> Exactly the same as you would do in any other language, like PHP, Perl, ... You basically need to load your survey into a frame embedded into your users site and on your RoR backend it won''t make any difference whether it''s loaded into the iFrame or would just be directly accessed. Best regards Peter De Berdt -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks for yorur help Peter. Do you have link or tutorial guide in the internet? I am new with this. Yudi Peter De Berdt wrote:> On 09 Jun 2010, at 08:57, Yudi Soesanto wrote: > >> What I am trying to do is: I creating a survey website. User can >> register to create a survey and this survey can be embedded to other >> site with providing embedded script. The problem I have, I don''t know >> how to create embedded code via ruby on rails. I never done this. > > Your embed code should be something alone the lines of: > > <script> > steps to write in javascript: > - Inject iFrame into the page > - Load survey url into the iFrame > </script> > > Exactly the same as you would do in any other language, like PHP, > Perl, ... > > You basically need to load your survey into a frame embedded into your > users site and on your RoR backend it won''t make any difference > whether it''s loaded into the iFrame or would just be directly accessed. > > > Best regards > > Peter De Berdt-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 09 Jun 2010, at 14:25, Yudi Soesanto wrote:> Thanks for yorur help Peter. > Do you have link or tutorial guide in the internet? I am new with > this.I''ll give you the basics, the rest is up to you (setting height, width, injecting in a specific div etc): <script type="text/javascript" charset="utf-8"> var iframe = document.createElement("iframe"); document.body.appendChild(iframe); iframe.src = "http://somedomain.com/survey/12345"; </script> Best regards Peter De Berdt -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thank you for your help. I tried to create embedding code like this: <a href="http://polsta.net/?embed=25cf2273474a99d9a0809d40bc8b495b" id="polstalink25cf2273474a99d9a0809d40bc8b495b">new survey</a><script type="text/javascript" src="http://polsta.net/javascripts/embedding.js"></script><scripttype="text/javascript">polstaEmbed(''25cf2273474a99d9a0809d40bc8b495b'', ''http://polsta.net/'')</script> Is there possible? Do I need to create embedding.js? How I read those script? Yudi Soesanto Peter De Berdt wrote:> On 09 Jun 2010, at 14:25, Yudi Soesanto wrote: > >> Thanks for yorur help Peter. >> Do you have link or tutorial guide in the internet? I am new with >> this. > > I''ll give you the basics, the rest is up to you (setting height, > width, injecting in a specific div etc): > > <script type="text/javascript" charset="utf-8"> > var iframe = document.createElement("iframe"); > document.body.appendChild(iframe); > iframe.src = "http://somedomain.com/survey/12345"; > </script> > > > Best regards > > Peter De Berdt-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yudi Soesanto wrote:> Thank you for your help. > I tried to create embedding code like this: > > <a href="http://polsta.net/?embed=25cf2273474a99d9a0809d40bc8b495b" > id="polstalink25cf2273474a99d9a0809d40bc8b495b">new survey</a><script > type="text/javascript" src="http://polsta.net/javascripts/embedding.js" >></script><script > type="text/javascript">polstaEmbed(''25cf2273474a99d9a0809d40bc8b495b'', > ''http://polsta.net/'')</script>And what happened when you tried?> > Is there possible? Do I need to create embedding.js? How I read those > script?These are questions best directed to a JavaScript forum.> > Yudi Soesanto >Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.