Windows Mobile 2005 - RESTful Javascript Issues

Hi,

I'm developing a warehouse management app that is partly accessed via
Windows Mobile 2005 devices. Unfortunately I'm having trouble with the
links generated for DELETE and PUT resource requests. In generating
the javascript to fake these HTTP methods it seems to break javascript
compatibility with the Pocket IE browser.

As an example:

<a href="/sessions/1" onclick="var f = document.createElement('form');
f.style.display = 'none'; this.parentNode.appendChild(f); f.method =
'POST'; f.action = this.href;var m = document.createElement('input');
m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method');
m.setAttribute('value', 'delete'); f.appendChild(m);f.submit();return
false;">Logout</a>

Has anyone run up against this before and do you think there is a
workaround? The problem is I'm tagging this system onto a main desktop
version by way of the respond_to do | format | ... end where I've
detected the browser and set it to handheld where required (similar to
all the rails iPhone app tutorials). I think this limits what I can do
as the server is expected POST requests at the very least and with
hidden _method attributes. Ideally I'd not like to have to create a
bunch of manual routes to the same resources just for the handheld
devices.

All thoughts much appreciated.

Andrew.

I've tracked the problem down to WM5 not supporting the
document.createElement() method.

Is there anyway to get the link_to helper to output the actual form to
the page rather than generating it on the fly? I suppose I could
rewrite the helper for mobile use?

Just wanted to check I'm not missing something obvious before I set
out on a workaround.