TypeError from lightbox Transition FX action?

I’m working on a site where the framework is made in Freeway by my
son, but I am providing the php/mysql code to squirt data into a

within it. This includes loading data into a
that's created with the lightbox Transition FX action. My son lives 300 miles away, so I don't have sight of the Freeway design.

We’re getting an error in IE:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR
3.5.30729)
Timestamp: Thu, 10 Feb 2011 10:28:04 UTC

Message: ‘null’ is null or not an object
Line: 71
Char: 42
Code: 0
URI: http://Š

for each of four such show/hide divs created with the action. I’m
running the IE in XP Pro within VMware.

Any ideas what are we doing wrong?

David


David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
email@hidden
www.ivdcs.co.uk


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi David,

Can you let us know what version of Freeway is being used, and if any other Actions are being used on the page? It seems like you may have another Action that uses the same JavaScript libraries as Transition FX but are targeting different versions. I would start by making sure all Actions used on that page (that aren’t built into Freeway) are all up to date.

Joe

On 10 Feb 2011, at 10:32, David Ledger wrote:

I’m working on a site where the framework is made in Freeway by my son, but I am providing the php/mysql code to squirt data into a

within it. This includes loading data into a
that’s created with the lightbox Transition FX action. My son lives 300 miles away, so I don’t have sight of the Freeway design.

We’re getting an error in IE:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Thu, 10 Feb 2011 10:28:04 UTC

Message: ‘null’ is null or not an object
Line: 71
Char: 42
Code: 0
URI: http://Š

for each of four such show/hide divs created with the action. I’m running the IE in XP Pro within VMware.

Any ideas what are we doing wrong?

David


David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
email@hidden
www.ivdcs.co.uk


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

At 12:48 +0000 10/2/11, Joe Billings wrote:

Hi David,

Can you let us know what version of Freeway is being used, and if
any other Actions are being used on the page? It seems like you may
have another Action that uses the same JavaScript libraries as
Transition FX but are targeting different versions. I would start by
making sure all Actions used on that page (that aren’t built into
Freeway) are all up to date.

Joe

It’s Freeway 5 Pro 5.5.1 with, apparently, just the Transition FX
version 1.0.9.

Safari We Inspector says that the site includes scriptaculous.js,
prototype.js, scriptaculous181packer.js and prototype1602packer.js.

I use my own JavaScript routines for Ajax requests like:

function updateDataPane(tgtpane, code, place, name, value) {
var sid = getSid();
if (window.XMLHttpRequest) {// code for IE7+, Firefox,
Chrome, Opera, Safari
dataPane=new XMLHttpRequest();
} else {// code for IE6, IE5
dataPane=new ActiveXObject(“Microsoft.XMLHTTP”);
}
dataPane.onreadystatechange=function() {
if (dataPane.readyState==4 && dataPane.status==200) {
pane = document.getElementById(tgtpane);
pane.innerHTML = dataPane.responseText;
}
}
request =
“dataPaneSet.php?SID=”+sid+“&code=”+code+“&place=”+place+“&name=”+name+“&value=”+value+“&tgtpane=”+tgtpane;
dataPane.open(“GET”,request,true);
dataPane.send();
}

… which is based on code from the Action.

David

On 10 Feb 2011, at 10:32, David Ledger wrote:

I’m working on a site where the framework is made in Freeway by my
son, but I am providing the php/mysql code to squirt data into a

within it. This includes loading data into a
that's created with the lightbox Transition FX action. My son lives 300 miles away, so I don't have sight of the Freeway design.

We’re getting an error in IE:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR
3.5.30729)
Timestamp: Thu, 10 Feb 2011 10:28:04 UTC

Message: ‘null’ is null or not an object
Line: 71
Char: 42
Code: 0
URI: http://S

for each of four such show/hide divs created with the action. I’m
running the IE in XP Pro within VMware.

Any ideas what are we doing wrong?


David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
email@hidden
www.ivdcs.co.uk


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Well, I can see you have one too many pairs of Proto/Scripty libraries
linked into the head of your page. If you’re using any of mine or
Joe’s Actions (Joe writes all of the FX Actions for Softpress) then
we’ve got shared code to make sure this doesn’t happen. But if you’ve
got say an older version of Protaculous and the latest Freeway, then
there will be a conflict.

As far as your hand-rolled Ajax, you should definitely look at the
Prototype documentation at http://api.prototypejs.org

Your entire function becomes this:

new Ajax.Updater(‘elementId’,‘uri’,{parameters:
{foo:‘bar’,'baz:‘blah’}});

Walter

On Feb 11, 2011, at 8:22 AM, David Ledger wrote:

At 12:48 +0000 10/2/11, Joe Billings wrote:

Hi David,

Can you let us know what version of Freeway is being used, and if
any other Actions are being used on the page? It seems like you may
have another Action that uses the same JavaScript libraries as
Transition FX but are targeting different versions. I would start
by making sure all Actions used on that page (that aren’t built
into Freeway) are all up to date.

Joe

It’s Freeway 5 Pro 5.5.1 with, apparently, just the Transition FX
version 1.0.9.

Safari We Inspector says that the site includes scriptaculous.js,
prototype.js, scriptaculous181packer.js and prototype1602packer.js.

I use my own JavaScript routines for Ajax requests like:

function updateDataPane(tgtpane, code, place, name, value) {
var sid = getSid();
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome,
Opera, Safari
dataPane=new XMLHttpRequest();
} else {// code for IE6, IE5
dataPane=new ActiveXObject(“Microsoft.XMLHTTP”);
}
dataPane.onreadystatechange=function() {
if (dataPane.readyState==4 && dataPane.status==200) {
pane = document.getElementById(tgtpane);
pane.innerHTML = dataPane.responseText;
}
}
request = “dataPaneSet.php?SID=”+sid+“&code=”+code+“&place=”+place
+“&name=”+name+“&value=”+value+“&tgtpane=”+tgtpane;
dataPane.open(“GET”,request,true);
dataPane.send();
}

… which is based on code from the Action.

David

On 10 Feb 2011, at 10:32, David Ledger wrote:

I’m working on a site where the framework is made in Freeway by my
son, but I am providing the php/mysql code to squirt data into a

within it. This includes loading data into a
that's created with the lightbox Transition FX action. My son lives 300 miles away, so I don't have sight of the Freeway design.

We’re getting an error in IE:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR
3.5.30729)
Timestamp: Thu, 10 Feb 2011 10:28:04 UTC

Message: ‘null’ is null or not an object
Line: 71
Char: 42
Code: 0
URI: http://S

for each of four such show/hide divs created with the action. I’m
running the IE in XP Pro within VMware.

Any ideas what are we doing wrong?


David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
email@hidden
www.ivdcs.co.uk


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

At 08:56 -0500 11/2/11, Walter Lee Davis wrote:

Well, I can see you have one too many pairs of Proto/Scripty
libraries linked into the head of your page. If you’re using any of
mine or Joe’s Actions (Joe writes all of the FX Actions for
Softpress) then we’ve got shared code to make sure this doesn’t
happen. But if you’ve got say an older version of Protaculous and
the latest Freeway, then there will be a conflict.

I’ve now got a copy of the Freeway document that I can build under my
own copy of Freeway 5.5.4. I can Publish, but not test because of the
database. My son now has 5.5.4 also.

I now only have references to prototype 1.6.1.0 and scriptaculous
1.8.3. However, the JS is specified twice. The first is:

Which looks like it comes from one of the Google Actions. I’ve turned
these off under Edit → Actions, but the JS sourcings are still there.

The second is deliberately entered in markup to be used by the
Transition FX Action. If I remove this markup the transitions fail
with
ReferenceError: Can’t find variable: Effect
and others in the Web Inspector Console. Don’t the Google packed.js
files provide the same functionality as the full sized versions?

As far as your hand-rolled Ajax, you should definitely look at the
Prototype documentation at http://api.prototypejs.org
Your entire function becomes this:
new Ajax.Updater(‘elementId’,‘uri’,{parameters:{foo:‘bar’,'baz:‘blah’}});
Walter

As I found when I started using these libraries a while back there is
precious little in the way of example code that does more than the
minimum for any library version. When you do find a decently complex
example it’s always for a different version. Should code like mine
below still work? It’s great advantage to me is that I can add
alert()s to be sure of the Ajax request being sent when the Ajax php
doesn’t seem to be getting the right data. So far I haven’t been able
to get this to work, but I can’t test with correct js library
versions until I get it back onto the real site.

David

On Feb 11, 2011, at 8:22 AM, David Ledger wrote:

At 12:48 +0000 10/2/11, Joe Billings wrote:

Hi David,

Can you let us know what version of Freeway is being used, and if
any other Actions are being used on the page? It seems like you
may have another Action that uses the same JavaScript libraries as
Transition FX but are targeting different versions. I would start
by making sure all Actions used on that page (that aren’t built
into Freeway) are all up to date.

Joe

It’s Freeway 5 Pro 5.5.1 with, apparently, just the Transition FX
version 1.0.9.

Safari We Inspector says that the site includes scriptaculous.js,
prototype.js, scriptaculous181packer.js and prototype1602packer.js.

I use my own JavaScript routines for Ajax requests like:
function updateDataPane(tgtpane, code, place, name, value) {
var sid = getSid();
if (window.XMLHttpRequest) {// code for IE7+, Firefox,
Chrome, Opera, Safari
dataPane=new XMLHttpRequest();
} else {// code for IE6, IE5
dataPane=new ActiveXObject(“Microsoft.XMLHTTP”);
}
dataPane.onreadystatechange=function() {
if (dataPane.readyState==4 && dataPane.status==200) {
pane = document.getElementById(tgtpane);
pane.innerHTML = dataPane.responseText;
}
}
request =
“dataPaneSet.php?SID=”+sid+“&code=”+code+“&place=”+place+“&name=”+name+“&value=”+value+“&tgtpane=”+tgtpane;
dataPane.open(“GET”,request,true);
dataPane.send();
}
David

On 10 Feb 2011, at 10:32, David Ledger wrote:

I’m working on a site where the framework is made in Freeway by
my son, but I am providing the php/mysql code to squirt data into
a

within it. This includes loading data into a
that’s
created with the lightbox Transition FX action. My son lives 300
miles away, so I don’t have sight of the Freeway design.


David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
email@hidden
www.ivdcs.co.uk


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Feb 18, 2011, at 9:33 AM, David Ledger wrote:

At 08:56 -0500 11/2/11, Walter Lee Davis wrote:

Well, I can see you have one too many pairs of Proto/Scripty
libraries linked into the head of your page. If you’re using any of
mine or Joe’s Actions (Joe writes all of the FX Actions for
Softpress) then we’ve got shared code to make sure this doesn’t
happen. But if you’ve got say an older version of Protaculous and
the latest Freeway, then there will be a conflict.

I’ve now got a copy of the Freeway document that I can build under
my own copy of Freeway 5.5.4. I can Publish, but not test because of
the database. My son now has 5.5.4 also.

I now only have references to prototype 1.6.1.0 and scriptaculous
1.8.3. However, the JS is specified twice. The first is:

Which looks like it comes from one of the Google Actions. I’ve
turned these off under Edit → Actions, but the JS sourcings are
still there.

No, all of the Softpress FX and Scripty Actions source their library
code from Google’s Content Delivery Network (CDN). This is in most
cases dramatically faster than hosting the code yourself. It’s
delivered with very long expires headers, gzip-compressed, and short
of minimizing the code using Packer or similar, it’s about as small as
it can be and still work.

The second is deliberately entered in markup to be used by the
Transition FX Action. If I remove this markup the transitions fail
with
ReferenceError: Can’t find variable: Effect
and others in the Web Inspector Console. Don’t the Google packed.js
files provide the same functionality as the full sized versions?

Yes they do, and you should definitely never need to enter any code by
hand in order to make an Action work. Certainly not if it’s one of the
built-in FX Actions. There is a very real danger that if you include
the same library twice, the careful hierarchy of JavaScript prototypes
(which pass for class inheritance in JavaScript’s looking-glass world)
will be disrupted, and you’ll end up trying to double-extend
something. The whole structure could collapse and nothing will work as
expected. There should only be one prototype.js (loaded first), and
one scriptaculous.js, and they should be a matched set, version-wise.

As far as your hand-rolled Ajax, you should definitely look at the
Prototype documentation at http://api.prototypejs.org
Your entire function becomes this:
new Ajax.Updater(‘elementId’,‘uri’,{parameters:
{foo:‘bar’,'baz:‘blah’}});
Walter

As I found when I started using these libraries a while back there
is precious little in the way of example code that does more than
the minimum for any library version. When you do find a decently
complex example it’s always for a different version. Should code
like mine below still work? It’s great advantage to me is that I can
add alert()s to be sure of the Ajax request being sent when the Ajax
php doesn’t seem to be getting the right data. So far I haven’t been
able to get this to work, but I can’t test with correct js library
versions until I get it back onto the real site.

I find Firebug to be invaluable when testing Ajax interactions. I
can’t imagine programming JavaScript without it, because it shows you
precisely what you sent, and what the server returned, and lays it all
out neatly for you in tabs.

Another feature you can use instead of alerts (once you’re running
Firebug) is console.log(). You can put almost anything, from a string
to anything that responds to to_string(), inside its parentheses, and
you will see the result (again, neatly formatted) in Firebug’s Console
tab. You can call as many of these as you like, and the only caveat is
to take them back out (or comment them out) before you show the page
to anyone running IE. Ugly errors ensue in that case.

The one-liner I posted, by the way, was a literal translation of your
code. The only change required of you by the defaults of Ajax.Updater
would be to change your server variables from $_GET to $_POST. If you
wanted to retain the same server code, then simply add this parameter:

method: 'get'

to the call, so the full method would read:

new Ajax.Updater('elementId','uri',{
	method: 'get',
	parameters:{foo:'bar','baz:'blah'}
});

If you’re getting all the values from a form, then you can use this
handy shortcut to populate the parameters hash:

...
parameters: $('form_id').serialize()
...

And that will take care of finding all of the form elements, creating
a hash out of their field names any escaping their values, etc. for
you. The only requirement is that you add an id to your form, or that
you obtain a reference to it another way, like this, to get a Freeway
form to play nice without a detour into Page / Form Setup / Extended:

var my_form = $(document.forms[0]);

From that moment on, my_form is a valid extended reference to the
first form on the page (in Freeway, that usually means the only form
on the page) and you have access to the full box of Prototype crayons.

I am sure you’ll agree that the first step’s a doozy when it comes to
learning a new library. But the investment pays off dramatically, and
almost immediately. I look back on some of my earlier forays into
DHTML and Ajax (one of which I still have to support) and shudder.

Walter

David

On Feb 11, 2011, at 8:22 AM, David Ledger wrote:

At 12:48 +0000 10/2/11, Joe Billings wrote:

Hi David,

Can you let us know what version of Freeway is being used, and if
any other Actions are being used on the page? It seems like you
may have another Action that uses the same JavaScript libraries
as Transition FX but are targeting different versions. I would
start by making sure all Actions used on that page (that aren’t
built into Freeway) are all up to date.

Joe

It’s Freeway 5 Pro 5.5.1 with, apparently, just the Transition FX
version 1.0.9.

Safari We Inspector says that the site includes scriptaculous.js,
prototype.js, scriptaculous181packer.js and prototype1602packer.js.

I use my own JavaScript routines for Ajax requests like:
function updateDataPane(tgtpane, code, place, name, value) {
var sid = getSid();
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome,
Opera, Safari
dataPane=new XMLHttpRequest();
} else {// code for IE6, IE5
dataPane=new ActiveXObject(“Microsoft.XMLHTTP”);
}
dataPane.onreadystatechange=function() {
if (dataPane.readyState==4 && dataPane.status==200) {
pane = document.getElementById(tgtpane);
pane.innerHTML = dataPane.responseText;
}
}
request = “dataPaneSet.php?SID=”+sid+“&code=”+code
+“&place=”+place+“&name=”+name+“&value=”+value+“&tgtpane=”+tgtpane;
dataPane.open(“GET”,request,true);
dataPane.send();
}
David

On 10 Feb 2011, at 10:32, David Ledger wrote:

I’m working on a site where the framework is made in Freeway by
my son, but I am providing the php/mysql code to squirt data
into a

within it. This includes loading data into a

that’s created with the lightbox Transition FX action. My son
lives 300 miles away, so I don’t have sight of the Freeway design.


David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
email@hidden
www.ivdcs.co.uk


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

One thing I forgot to mention: be sure that you and your son have the
same set of Actions installed, and the latest version of those
Actions. Freeway will helpfully cache Actions into the Freeway
document in an attempt to rescue from a missing Action.

This feature may appear to work okay with those cached Actions
replacing the missing versions. But any bundle Actions, like anything
that uses Prototype, will only partially work. The fwaction file
itself will be cached, but the entire contents of the fwactionb bundle
wrapper will be missing or not in the correct hierarchy, and so any
library files that the fwaction relies on will be missing.

At best, you’ll have errors in Freeway. At worst, it will all appear
to work, but result in a broken page from a JavaScript standpoint.

Walter

On Feb 18, 2011, at 10:05 AM, Walter Lee Davis wrote:

I’ve now got a copy of the Freeway document that I can build under
my own copy of Freeway 5.5.4. I can Publish, but not test because
of the database. My son now has 5.5.4 also.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options