in reply to how would you...

Basically, you're asking how to achive (to Duh!) two mutually exclusive methods:

user MUST have javascript enabled
or
and if it is not present

So, I would rethink your architecture.