I'm trying to add a snippet of javascript to a textInput using onBlur:
the code looks like this: html textInput id: self getHtmlId;
class: self cssInputClass; size: metaData inputColumns; callback: self callback ;
onBlur: 'document.getElementById("rowfrm").submit();'; value: self valueBlock value.
when I render it in Pharo (Thanks Boris!) I get something like this: <input id="PasswordReset_emailAddress" class="xlarge text" size="30" name="1" onblur="document.getElementById("rowfrm").submit();" value="" type="text"/> when i see it in the browser, the onBlur is missing. <input id="PasswordReset_emailAddress" class="xlarge text" size="30" name="1" value="" type="text"> Any idea what's going on? Also, is the encoding in the onBlur string part of the problem? Thanks. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Sorry, reposting in the hope that someone can shed some light on why my onBlur textItem attribute gets dropped when Seaside renders it to a browse, but includes it when rendering within Smalltalk.
On Fri, Sep 30, 2011 at 5:34 PM, Larry White <[hidden email]> wrote: > I'm trying to add a snippet of javascript to a textInput using onBlur: The code looks like this: html textInput id: self getHtmlId; class: self cssInputClass; size: metaData inputColumns; callback: self callback ; onBlur: 'document.getElementById("rowfrm").submit();';
> value: self valueBlock value. > when I render it in Pharo (Thanks Boris!) I get something like this: > > <input id="PasswordReset_emailAddress" > > class="xlarge text" size="30" name="1" > > onblur="document.getElementById("rowfrm").submit();" > > value="" type="text"/> > > when i see it in the browser, the onBlur is missing. > > <input id="PasswordReset_emailAddress" class="xlarge text" size="30" name="1" value="" type="text"> > > Any idea what's going on? Also, is the encoding in the onBlur string part of the problem? > > Thanks. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
If you're using jQuery these events are bound onDomReady, look towards the end of the page for that block. Sent from my iPhone
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by larrry
Ugh, fat-fingered the repost - double apologies, but I wanted to take
out the formatting to make this easier to read. Hoping that someone can shed some light on why my onBlur textItem attribute gets dropped when Seaside renders it to a browse, but includes it when rendering within Smalltalk. > On Fri, Sep 30, 2011 at 5:34 PM, Larry White <[hidden email]> wrote: I'm trying to add a snippet of javascript to a textInput using onBlur: The code looks like this: html textInput id: self getHtmlId; class: self cssInputClass; size: metaData inputColumns; callback: self callback ; onBlur: 'document.getElementById("rowfrm").submit();'; value: self valueBlock value. when I render it in Pharo (Thanks Boris!) I get something like this: <input id="PasswordReset_emailAddress" class="xlarge text" size="30" name="1" onblur="document.getElementById("rowfrm").submit();" value="" type="text"/> But, when i see it in the browser, the onBlur is missing: <input id="PasswordReset_emailAddress" class="xlarge text" size="30" name="1" value="" type="text"> Any idea what's going on? Also, is the encoding in the onBlur string part of the problem? Thanks. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Boris Popov, DeepCove Labs (SNN)
I include the jquery library for drawing charts separate from this
logic, and no, I don't have an onDomReady block in the rendered html. I'm sorry if this is a dumb question but the onBlur: event as an attribute is legal html, right? And the code I include in the onBlur: doesn't require any extra javascript libraries afaik. It could be simplified i think to "this.form.submit()" and should 'just work' maybe. ;) For now, I'm not even concerned with why it doesn't work, just trying to figure out why it wouldn't render as part of the generated html. On Sun, Oct 2, 2011 at 12:35 PM, Boris Popov, DeepCove Labs <[hidden email]> wrote: > If you're using jQuery these events are bound onDomReady, look towards the > end of the page for that block. > > Sent from my iPhone > On 2011-10-02, at 12:27, "Larry White" <[hidden email]> wrote: > > Sorry, reposting in the hope that someone can shed some light on why my > onBlur textItem attribute gets dropped when Seaside renders it to a browse, > but includes it when rendering within Smalltalk. > > On Fri, Sep 30, 2011 at 5:34 PM, Larry White <[hidden email]> wrote: >> > I'm trying to add a snippet of javascript to a textInput using onBlur: The > code looks like this: > html textInput > id: self getHtmlId; > class: self cssInputClass; > size: metaData inputColumns; > callback: self callback ; > onBlur: 'document.getElementById("rowfrm").submit();'; >> value: self valueBlock value. >> when I render it in Pharo (Thanks Boris!) I get something like this: >> >> <input id="PasswordReset_emailAddress" >> >> class="xlarge text" size="30" name="1" >> >> onblur="document.getElementById("rowfrm").submit();" >> >> value="" type="text"/> >> >> when i see it in the browser, the onBlur is missing. >> >> <input id="PasswordReset_emailAddress" class="xlarge text" size="30" >> name="1" value="" type="text"> >> >> Any idea what's going on? Also, is the encoding in the onBlur string part >> of the problem? >> >> Thanks. > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |