--
You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group.
To post to this group, send email to iphone...@googlegroups.com.
To unsubscribe from this group, send email to iphonewebdev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
Oh sure, so you just need to redirect (in JS or in headers) after form submission???
(e.g. window.location.href='http://mysite.net/index.html" ??)
People do this commonly to receive the form (especially the final form) as a post but then redirect to a page that is obtained in get).
Your original message talked about removing the back button... therefore it was a sin.
paul
Then what if user press browser back button ?
> People do this commonly to receive the form (especially the final form) as a post but then redirect to a page that is obtained in get).
You can do HTTPRequest using POST method rather than get using:
var xhReq = createXMLHttpRequest(); // this is a function to return the XHR object based on browser detection
var params = "var1="+input1.value+"&var2="+input2.value;
xhReq.open("post", "/submit?d="+(new Date().getTime()), true);
xhReq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhReq.onreadystatechange = function()
{
if(xhReq.readyState == 4 && xhReq.status == 200)
{
// xhReq.responseText is the value your script returns.
history.go(-(history.length-1));
}
}
xhReq.send(params);
No need to reload the page to send a POST form.
I know there is something built-in in iUI for form but i just don't really know how it works :)
Remi
> Your original message talked about removing the back button... therefore it was a sin.
>
> paul
>
>
>>
>>
>> On 29 fév, 20:38, Paul Libbrecht <p...@curriki.org> wrote:
>>> Bernard,
>>>
>>> isn't that a sin for a web-page?
>>> Or are you talking of an app that is not a web0browser?
>>> I think your desire should not be doable.
>>>
>>> To avoid that a back repopulates all the data of a previous workflow
>>> you should simply set the appropriate expiration in the headers.
>>>
>>> paul
>>>
>>> On 22 fév, 14:37, Fibo <bernard.savo...@gmail.com> wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>> After some form validation, I want to return to the main page of the
>>>> app with no "backbutton" in the toolbar. This is probably written in
>>>> the doc... but I can't find it and my trial and errors just fail to
>>>> get this working.
>>>> Any idea or suggestion?
>
Hi Bernard,As a quick answer, I would suggest:history.go(-(history.length-1))
but it probably needs some more testing...
Remi
On Wed, Feb 22, 2012 at 2:37 PM, Fibo <bernard...@gmail.com> wrote:
After some form validation, I want to return to the main page of the
app with no "backbutton" in the toolbar. This is probably written in
the doc... but I can't find it and my trial and errors just fail to
get this working.
Any idea or suggestion?
--
You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group.
To post to this group, send email to iphone...@googlegroups.com.
To unsubscribe from this group, send email to iphonewebdev+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/iphonewebdev/-/fqGDe5uxrjUJ.
To unsubscribe from this group, send email to iphonewebdev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/iphonewebdev/-/k9rEufzxpv4J.
To unsubscribe from this group, send email to iphonewebdev...@googlegroups.com.