Symfony – Prototype – Lightwindows – problems
Friday, February 13th, 2009Hi all,
here is a problem (and solution) that tasked me for around 3 hours last night.
I am using Symfony MVC (ver 1.0) framework to create an intranet based application. A lot of the work is AJAX driven to help with usability.
I had a requirement to be able to create new entities from one page, the entity requires a large amount of information to be entered. I am not decided but the two choices I have tried are
a) Using a short form that reduces the amount of data needed to create the entity (e.g. just the name of the thing) and
b) A pop up modal window that presents the full form.
The first I implemented with no problems, fully ajaxed up and working – a good option really.
The second I decided to use the lightwindow plugin. After following all the instructions to make it work it just sat there mocking me, nothing happening. I use Firebug to help me decode the problems and this tool gave the following cryptic error:
"0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)"
I had to laugh – it reminded me of a Microsoft error message, similar to something BizTalk throws up if you forget to enable the first part of an orchestration (noob error!).
Any ways – a bit of searching on Google brings back this blog (thanks to Dave for putting me on the right track).
I then looked at the Prototype libraries that come shipped with Symfony 1.0 and doh! they are older than those required for lightwindow, simple error, simple solution. It just took me a long time to figure out, and I thought other noobs may be in a similar situation searching for a simple answer.
Downloading and installing the prototype plugin solved the prototype problem gave me great looking pop up windows (just don’t forget to clear your cache using symfony cc).
Now all I have to sort out is the stupid cross browser problems (IE in particular!) ggggrrrrrr.
