Results 1 to 3 of 3

Thread: Shows image when submit upload form

  1. #1
    Join Date
    May 2008
    Posts
    7

    Default Shows image when submit upload form

    Hi, i just cant make work the upload progress bar. So i want to show an UPLOADING gif image when i submit the upload form.

    I can do it in normal pages, but this script works with templates, and i just cant make it work. Show me error when i put this code in the <head>tag (in header.tpl).

    Code:
     <div ID="waitDiv" style="position:absolute;left:300;top:300;visibility:hidden">
    <table cellpadding="6" cellspacing="0" border="1" bgcolor="#000000" bordercolor="#FFFFFF">
    <tr><td align=center>
    <font color="#ffffff" face="Verdana" size="4">Cargando página...</font>
    [img]/images/cargando.gif[/img]
    </td>
    </tr></table>
    </div>
    
    <SCRIPT>
    <!--
    var DHTML = (document.getElementById || document.all || document.layers);
    function ap_getObj(name) {
    if (document.getElementById)
    { return document.getElementById(name).style; }
    else if (document.all)
    { return document.all[name].style; }
    else if (document.layers)
    { return document.layers[name]; }
    }
    function ap_showWaitMessage(div,flag) {
    if (!DHTML) return;
    var x = ap_getObj(div); x.visibility = (flag) ? 'visible':'hidden'
    if(! document.getElementById) if(document.layers) x.left=280/2; return true; } ap_showWaitMessage('waitDiv', 3);
    //-->
    </SCRIPT>
    THIS IS THE ERROR MESSAGE

    Fatal error: Smarty error: [in header.tpl line 16]: syntax error: unbalanced parenthesis in if statement (Smarty_Compiler.class.php, line 925) in /home/ecuacana/public_html/include/smarty/libs/Smarty.class.php on line 362

    PLEASE HELP ME..

    I tried with (onsubmit) Javascript code and the same problem...

  2. #2
    Join Date
    Jan 2008
    Posts
    147

    Default Re: Shows image when submit upload form

    Use {literal}

    More details available at

    http://www.smarty.net/manual/en/languag ... iteral.php

  3. #3
    Join Date
    May 2008
    Posts
    7

    Default Re: Shows image when submit upload form

    YES! it works... thanks a lot...

Similar Threads

  1. Embedded Image upload from PC not working
    By lowcarb in forum Bug Reports
    Replies: 0
    Last Post: 07-25-2008, 05:49 AM
  2. Search form
    By pitox in forum Template Modifications
    Replies: 3
    Last Post: 02-29-2008, 10:50 PM
  3. chancing signup form
    By afa in forum Template Modifications
    Replies: 1
    Last Post: 02-16-2008, 10:42 AM
  4. e-mail form
    By slimakraf in forum Template Modifications
    Replies: 0
    Last Post: 11-24-2007, 12:07 PM
  5. Submit Your Site to Video Search Engines
    By tnuriel in forum General Discussions
    Replies: 1
    Last Post: 09-19-2007, 01:24 PM

Bookmarks

Posting Permissions

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