Hi there.
I'm creating a little iphone webapp for my school using the iWebkit (fancy css/javascript for making the interface for iphone / ipod touch web sites / webapps.
There is a feature called Popup which simulates a popup that you get in settings on your iPhone when you reset all settings (i.e. confirmation popup).
How can I make the popup appear AUTOMATICALLY when a HTML page is displayed - rather than having to click on the link per example of the user guide? (Page 22). I've tried doing a onload in the body tag and even header tag but it doesn't work.
I don't want to use a javascript alert as it's not sexy.
This is what the code currently looks like based on Doug's suggestion below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<title>Popup Test</title>
<script src="javascript/functions.js" type="text/javascript"></script>
<script type="text/javascript">
document.addEventListener('load', function(){
window.setTimeout(function(){
iWebkit.popup('popup1'); // Adjust this line to have the correct popup id
}, 5000); // This is in milliseconds. Keep the number as low as possible so it still works
}, false);
</script>
123
Are you sure you want to do this?
Stop Server
Cancel