SOLUTION!
Apparently there are some known bugs with Request.HTML...
responseJavascript is to be used somehow within the onSuccess, but im
not quite sure how...
anyways the thanks to shanebo, i was able to produce a working
solution
example:
var myScript = new Asset.javascript('/scripts/testScript.js', {id:
'testScript'});
you'll need to load the Assets library in order for it to understand
Asset though.
but make sure you define your js as an asset AFTER you load your HTML
elements.
On Nov 17, 9:39 am, aowie <[EMAIL PROTECTED]> wrote:
> OK update on this post:
>
> Sorry guys i was using login.php as a module on other pages too, so i
> mustve taken out the js due to it not working.
>
> Anyways, I have made a dupe of that page with the js put back in, and
> it still produces the same result.
> I have also added both types of requests to help debug this situation.
> Request and Request.HTML
> You'll notice that if you click Request, only one instance loads in
> the appropriate div. But if you use the Request.HTML multiple
> instances load and the javascript will load on the first response
> after the second click, but only the first response???
>
> i had evalscripts set to true on the first request, but it broke it...
> and Request.HTML has it set to true, but no evaluation until the 2nd
> click.
> not to mention the error it returns "ob.toString is not a function".
>
> Let me know if you want me to add in anything else to help debug this.
> Thanks!
>
> On Nov 17, 6:04 am, "Steve Onnis" <[EMAIL PROTECTED]> wrote:
>
> > Are you saying there is means to be js code
> > inhttp://istoleyourbaby.com/login.php? Because there isnt.....
>
> > -----Original Message-----
> > From: [email protected]
>
> > [mailto:[EMAIL PROTECTED] On Behalf Of Oskar Krawczyk
> > Sent: Monday, 17 November 2008 11:00 PM
> > To: MooTools Users
> > Subject: Re: evalscripts, y u no worky?
>
> > Hi, you're saying the JS is "in the same page" but when I look into
> > login.php source there is no JS there. So what I assume you mean is
> > that the SECOND file you load is being stripped.
>
> > Well it's not – the JS file simply doesn't even load in the request –
> > at least that's what Firebug shows.
>
> > Best,
> > Oskar
>
> > On Nov 17, 4:31 am, aowie <[EMAIL PROTECTED]> wrote:
> > > So ive noticed that I am not the only one around here that cant get a
> > > correct eval response from externally loading other js scripts through
> > > Request or Request.HTML
>
> > > Ive stripped out only what is necessary for debugging purposes
> > here:http://istoleyourbaby.com/test.html
>
> > > the HTML loads perfectly but the js in the same page is stripped and
> > > disappears. Tis a very strange thing, and I need some fresh eyes on
> > > this one... mine are getting weary.
>
> > > The js that needs to be loaded is a simple default value filler and
> > > style adjuster. The js works fine elsewhere it just is getting
> > > stripped. So can anyone tell me if my syntax is wrong somewhere
> > > maybe.. or am i just missing something obvious?
>
> > > Any help is appreciated, thanks!