jQuery in XPages @IBMConnect demo fixed – and the problem explained

So I am in the middle of doing my presentation @ IBMConnect 2013 and everything is going relatively well…..and someone asks a question

Question: “Hey Marky – does jQuery work in XPiNC?”

Marky: “sure it does watch this”

#SmugWithConfidence
Click Click
#FailWhale
404 – proxyServer Error

WTF ????

#PresenterPanic??!!
#CrowdLaughter (mostly from my loyal friends)….
#OhTheShame

WTF??? 😦

I told the audience it was because I had obviously broken it and I thought I knew the problem – i apologized profusely and said that I would fix it ASAP. Well today is ASAP 😛

It now works – you can download the sample database from http://demo.xomino.com and run it in XPiNC

The Problem

Some genius…..had messed with the menu for IBMConnect and changed the menu links so they looked like this

	<a href="/xomino/jQinX.nsf/xPageSlide.xsp">PageSlide</a>

And that works perfectly fine in a web browser – but locally on the XPiNC webserver causes the ProxyServer error above!! The fix is simple – change it so that it is not relative to the server.

The issue is the /xomino link which is interpreted by the browser as http://demo.xomino.com, SLASH xomino. This is good technique because it doesn’t name the server and is therefore portable to other servers. But apparently fails in the local XPiNC server.

Why? I have no idea unfortunately but I am more concerned with the solution than the cause. Changing the links as follows and we have a working demo database again

	<a href="xPageSlide.xsp">PageSlide</a>

as all the demo pages are at the same level in the URL this is not a problem. Weird eh!

I will talk to some people smarter than I and see if I can find out why this problem is caused by the  XPiNC server – but be aware that you should not use links relative to the XPiNC server….weird!

I am very sorry this screwed up in the demo but hopefully enough people will forgive me and we can all carry on 🙂 🙂

6 thoughts on “jQuery in XPages @IBMConnect demo fixed – and the problem explained

  1. I’m so sorry I missed this session. Especially the part where it didn’t work. That would have been worth not being here to clear the storm drain on Wednesday and having my house flood. 😉

    Okay, seriously it would have been fun to shout from the audience that it doesn’t work in IE8 either. ;-D

  2. It was a great session, you covered the mistake so well I almost believed you planned it!

    BTW – the reason is in xPINC urls have a /xsp/ stuck at the front of them (ie. /xsp/xomino/jQinX.nsf/xPageSlide.xsp would work in the client, just not the browser).

    I would like to think its because of a difference between xPINC and regular old domino web preview, but I suspect it was an elaborate joke from IBM designed to embarrass you on stage 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s