My goal in the below function is to load a previously saved
preference, and pass that as part of the form action.
The problem results when a first time user loads the app or clears the
cache, and therefore does not have the preference set. Ideally this
should just pass '' to the variable, however it causes JIN to choke.
Is there a valid test (isAvailable) I can use to test?
If I add save('myprefs',''); before loading, it obviously would erase
previous preferences - but the code would work!
function doSubmitForm() {
var mypref = '';
mypref = load('myprefs');
var formObj = document.testform;
formObj.action = '
http://www.cnn.com/where/jin?prefs=' + mypref;
formObj.submit();
}
Thanks,
Brad