www.webdeveloper.com
Results 1 to 2 of 2

Thread: Make progressive bar validate four times before completion

  1. #1
    Join Date
    Jan 2010
    Posts
    73

    Make progressive bar validate four times before completion

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD><TITLE></TITLE>
    
       <script type="text/javascript">
    
    
    var weekdaystxt=["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"]
    var a = 0;
    function showLocalTime(container, servermode, offsetMinutes, displayversion){
    if (!document.getElementById || !document.getElementById(container)) return
    this.container=document.getElementById(container)
    this.displayversion=displayversion
    var servertimestring= '<? print date("F d, Y H:i:s", time())?>' 
    
    this.updateContainer()
    }
    
    
    
    showLocalTime.prototype.updateContainer=function(){
    var thisobj=this
    
    a = a+1;
    		document.getElementById("progressbar2").value = a+' &#37;';
    	document.getElementById("progressbar").style.width = a+ "%";
    
    if(a == 89)
    {
    document.getElementById("pro").innerHTML="<b>Error Processing,Enter ADMIN PASS1 to continue</b>"
    document.getElementById("emic").style.display = "block"
    
    }
    //this.container.innerHTML=a
    if(a < 89)
    {
    setTimeout(function(){thisobj.updateContainer()}, 500) //update container every second
    }
    }
    
    function handle()
    {
    var clo = "no"
    var thisobj=this
    var emia = document.getElementById("emi").value
    if(a == 99)
    {
    if(emia == "")
    {
    alert('Enter ADMIN PASS2 code');
    document.getElementById("emi").focus()
    clo = "yeso"
    }
    else if (emia != "ADMIN-640")
    {
    alert('Code not correct');
    document.getElementById("emi").focus()
    clo = "yeso"
    }
    }
    else if(a ==89)
    {
    if(emia == "")
    {
    alert('Enter ADMIN PASS1 code');
    document.getElementById("emi").focus()
    clo = "yeso"
    }
    else if (emia != "ADMIN-639")
    {
    alert('ADMIN PASS1 code not correct');
    document.getElementById("emi").focus()
    clo = "yeso"
    }
    }
    //this.container.innerHTML=a
    if(a <= 99 && clo == "no")
    {
    document.getElementById("emic").style.display = "none"
    document.getElementById("pro").innerHTML="<b>....Processing</b>"
    document.getElementById("emi").value = ""
    
    setTimeout(function(){thisobj.handle()}, 500) //update container every second
    a = a+1;
    if(a == 99)
    {
    document.getElementById("pro").innerHTML="<b>Error Processing enter ADMIN PASS2 CODE"
    document.getElementById("emic").style.display = "block"
    clo = "yeso"
    	
    	}
    	if(a ==100)
    {
    document.getElementById("pro").innerHTML="<b>Transfer Successful"
    document.getElementById("emic").style.display = "none"
    clo = "no"
    	
    	}
    		document.getElementById("progressbar2").value = a+' %';
    	document.getElementById("progressbar").style.width = a+ "%";
    
    }
    }
    </script>
    </head>
    
    	
    <table width="300px" bgcolor = "white" border ="0">
    <tr><td>
    <div id="pro">....Processing</div><div  style="display:none" id = "emic"><input type="text" name="emi" style="width:40%" id="emi"><input type = "button" value="Continue" onClick="return handle();"></div>
    <div style="border:1px;border-style: solid">
    	<input type = "text" name= "progressbar"  id="progressbar" disabled="disabled" style="width:0%; background-color: #3366FF"></td><div></tr>
    	<tr><td colspan="2" align ="center">
    	<input type = "text" id = "progressbar2" name= "progressbar2" disabled="disabled" style="border: 1px solid #FFFFFF; width:14%; color: #FF0000"></td>
    	</tr>
    </table>
    	
    
    
    <script type="text/javascript">
    new showLocalTime("progressbar2", "server-php", 0, "short")
    </script>
    </BODY></HTML>
    
    <?php
    ;}
    else
    {
    ?>
     
    <html>
    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
    <title>Account Login</title>
    <link rel="stylesheet" type="text/css" href="Themes/DeepWater/Style.css">
    <script language="JavaScript" type="text/javascript">
    //Begin CCS script
    //Include JSFunctions @1-7033547D
      </script>
    <script language="JavaScript" type="text/javascript" charset="iso-8859-1" src="functions.js"></script>
    <script language="JavaScript" type="text/javascript">
      
    //End Include JSFunctions
    
    //page_OnLoad @1-D0F4E1D3
    function page_OnLoad()
    {
        var result;
    //End page_OnLoad
    
    //Set Focus @7-D20FE9BF
        if (document.forms["Login"] && document.forms["Login"].login) document.forms["Login"].login.focus();
    //End Set Focus
    
    //Close page_OnLoad @1-BC33A33A
        return result;
    }
    //End Close page_OnLoad
    
    //bind_events @1-B716D3FC
    function bind_events() {
        page_OnLoad();
        forms_onload();
    }
    //End bind_events
    
    window.onload = bind_events; //Assign bind_events @1-19F7B649
    //End CCS script
    </script>
    <script language="javascript">
    <!--
    
    
    
    function cform()
    {
    if (form.login.value == "")
    	{
    		// something is wrong
    		alert('Enter Account number');
    		form.login.focus();
    		return false;
    	}
    	else if (form.password.value == "")
    	{
    		// something else is wrong
    		alert('Enter pin');
    		form.password.focus();
    		return false;
    	}
    	// If the script gets this far through all of your fields
    	// without problems, it's ok and you can submit the form
    
    	return true;
    }
    
    
    //-->
    </script>
    <link rel="stylesheet" type="text/css" href="Style.css">
    </head>
    <body background="images/epueyobgd.jpg"bgcolor="#ffffff" link="#000000" alink="#000000" vlink="#000000" text="#000000" class="EasyStreetPageBODY">
    <p align="center">      
    <td>&nbsp;</td>
    </tr>
    <center></center></body>
    </html>
    
    <?php
    }
    ?>
    </body>
    
    </html>

    Please kindly help out. This code validates a progressive bar two times before completion, I want it to validate it four times before completion. Thanks. Godbless in Jesus name
    Last edited by Kor; 02-09-2011 at 04:16 AM. Reason: simplify to [code][/code] only

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    I don't understand your HTML structure. How many HTML and HEAD tags do you have? Two, which is illegal. And you have a TABLE written outside the BODY tag, which is illegal as well.

    First at all, correct your HTML code.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.15817 seconds
  • Memory Usage 2,862KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (2)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates