<script type="text/javascript">
$(window).ready(function() {
$('#multipage').multipage();
$('multipage').submit();
});
function generateTabs(tabs) {
html = '';
for (var i in tabs) {
tab = tabs[i];
html = html + '<li class="multipage_tab"><a href="#" onclick="return $(\'#multipage\').gotopage(' + tab.number + ');">' + tab.title + '</a></li>';
}
$('<ul class="multipage_tabs" id="multipage_tabs">'+html+'<div class="clearer"></div></ul>').insertBefore('#multipage');
}
function setActiveTab(selector,page) {
$('#multipage_tabs li').each(function(index){
if ((index+1)==page) {
$(this).addClass('active');
} else {
$(this).removeClass('active');
}
});
}
function transition(from,to) {
$(from).fadeOut('fast',function(){$(to).fadeIn('fast');});
}
function textpages(obj,page,pages) {
$(obj).html(page + ' of ' + pages);
}
</script>
<input type="submit" name="Submit" value="Submit" onclick="this.disabled=true; this.value='Please Wait...';" />
The object is to Prevent the user from pressing the submit button twice.
Unless one of you guys can tell me a better way to do it with the above code.