Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Append widget to a div?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Pedro Nascimento  
View profile  
 More options Jan 23 2012, 12:49 pm
From: Pedro Nascimento <pnascime...@gmail.com>
Date: Mon, 23 Jan 2012 15:49:17 -0200
Local: Mon, Jan 23 2012 12:49 pm
Subject: Append widget to a div?

Hi, I'm trying to append a widget to a div, but can't seem to do so.

My widget is like this:
http://pastie.org/3238256

Notice that on add_widget(evt) I want to append what the widget renders,
but can't seem to do so.
If I replace line 13 with something simpler like *render :text =>
"alert('test');"* it works, though. I've tried unescape_javascript, but
looks like this is unavailable at this scope.

What am I doing wrong, or better, what should I be doing?

Thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nick Sutterer  
View profile  
 More options Jan 23 2012, 3:26 pm
From: Nick Sutterer <apoton...@gmail.com>
Date: Mon, 23 Jan 2012 21:26:36 +0100
Local: Mon, Jan 23 2012 3:26 pm
Subject: Re: Append widget to a div?
Hi Pedro,

On Mon, Jan 23, 2012 at 6:49 PM, Pedro Nascimento <pnascime...@gmail.com> wrote:
> Hi, I'm trying to append a widget to a div, but can't seem to do so.

> My widget is like this:
> http://pastie.org/3238256

> Notice that on add_widget(evt) I want to append what the widget renders, but
> can't seem to do so.
> If I replace line 13 with something simpler like render :text =>
> "alert('test');" it works, though. I've tried unescape_javascript, but looks
> like this is unavailable at this scope.

Well you need to escape the JS in the append string. Try #escape_js.

Also, you don't need the :after_initialize hook. Try this:
http://nicksda.apotomo.de/2011/10/released-apotomo-1-2/ Using the
:passing option you should be fine!!!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »