Ir para conteúdo
Fórum Script Brasil

BrunoVieira

Membros
  • Total de itens

    23
  • Registro em

  • Última visita

Tudo que BrunoVieira postou

  1. oi pessoal , tudo bem? há forma de fazer um alert em javascript se um campo type file estiver vazio? estou a validar os outros campos desta forma: if (document.form1.foto1.value=="") { alert("O campo foto1 não pode ficar vazio"); document.form1.foto1.focus(); return false; } mas como o type file não tem value... alguém tem alguma dica... abraço e obrigado
  2. BrunoVieira

    paginação com bug

    já dei a volta... optei por fazer uma coisa bem mais simples. $pag=$_GET['p']; $iq=0; do { $iq++; echo "<td class='lol'><a href='index.php?page=5&submenu=$submenu&p=".$iq."' target='_self' "; if ($pag==$iq || $pag=="" ){ echo "style='font-family: Verdana, Geneva, sans-serif; font-size: 12px; font-weight: bold; color:#6E6F70; text-decoration:none'";} else{ echo "style='font-family: Verdana, Geneva, sans-serif; font-size: 12px; font-weight: bold; color:#034EA2; text-decoration:none'";} echo">".$iq."| </a></td> "; } while ($iq<$total_registros);
  3. oi pessoal. estou com um bug, estou a fazer a paginação de uma busa: $sql_select_all = "SELECT * FROM produtos where id_submenu=$submenu"; $sql_query_all = mysql_query($sql_select_all); $total_registros = mysql_num_rows($sql_query_all); $pags = ceil($total_registros/$quantidadeProdPagina); $max_links = 20; echo "<table align='right' style=' padding-right:15px;' ><tr><td > <table align='right'> <tr>"; for($i = $paginaActual-$max_links; $i <= $p-1; $i++) if(!($i <= 0)) echo "<td class='lol'><a href='index.php?page=5&submenu=$submenu&p=".$i."' target='_self' style='font-family: Verdana, Geneva, sans-serif; font-size: 12px; font-weight: bold; color:#034EA2; text-decoration:none' >".$i."|</a></td> "; echo "<td class='pag_act' style='font-family: Verdana, Geneva, sans-serif; font-size: 12px; font-weight: bold; color:#6E6F70; text-decoration:none' >".$paginaActual."|</td>"; for($i = $paginaActual+1; $i <= $paginaActual+$max_links; $i++) if(!($i > $pags)) echo "<td class='lol'><a href='index.php?page=5&submenu=$submenu&p=".$i."' target='_self' style='font-family: Verdana, Geneva, sans-serif; font-size: 12px; font-weight: bold; color:#034EA2; text-decoration:none' >".$i."|</a> </td>"; echo " </tr></table> </tr></table>"; este codigo vai mostrar o numero um a um... ex: 1| 2| 3| ..... está a funcionar, só que quando carrego por exemplo no 2 o numero 1 deixa de se ver... http://sasibijou.com/qwe/index.php?page=5&...bmenu=1&p=1 tenho em 2 servidores o mesmo codigo, num servidor está bem e noutro já não está. alguém me pode dar uma ajuda. Obrigado
  4. estou a pensar em utilizar uma forma simples para promover algum destaque... pensei no seguinte: quando entramos no site, escurece o site todo e mostra no centro uma imagem. já vi isso em algum sites, mas não sei como se chama isso. penso que deve ser tipo as galerias em jquery.. alguém me sabe dar alguma dica para eu tentar. grande abraço
  5. temos que resolver os problemas, e não ficar a espera que os resolvam por nós . :D :lol: :lol: desta forma deu para fazer o k eu queria...
  6. sim Jonathan, mas desta forma tem que dar, pois tenho essa forma num site.
  7. já tentou desta forma? <select name="check[]" MULTIPLE> <option name="check[]" value="teste01">Teste01</option> <option name="check[]" value="teste02">Teste02</option> <option name="check[]" value="teste03">Teste03</option> <option name="check[]" value="teste04">Teste04</option> </select> no envio foreach($_POST['check'] as $value) { $check_msg .= "$value, \n"; } com o <input type="checkbox" sei k dá...
  8. mas isso é para enviar para a base de dados? para que quer isso?
  9. fica a dica para alguém com o mesmo problema. <script type="text/javascript"> document.write("<style type='text/css'>#thephoto {visibility:hidden;}</style>"); function initImage() { imageId = 'thephoto'; image = document.getElementById(imageId); setOpacity(image, 0); image.style.visibility = "visible"; fadeIn(imageId,0); } function fadeIn(objId,opacity) { if (document.getElementById) { obj = document.getElementById(objId); if (opacity <= 100) { setOpacity(obj, opacity); opacity += 10; window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100); } } } function setOpacity(obj, opacity) { opacity = (opacity == 100)?99.999:opacity; // IE/Win obj.style.filter = "alpha(opacity:"+opacity+")"; // Safari<1.2, Konqueror obj.style.KHTMLOpacity = opacity/100; // Older Mozilla and Firefox obj.style.MozOpacity = opacity/100; // Safari 1.2, newer Firefox and Mozilla, CSS3 obj.style.opacity = opacity/100; } window.onload = function() {initImage()} // --> </script>
  10. tenta desta forma.. <a href="java script:history.go(-1)">Voltar</a> assim tem de dar.
  11. mas o select multiple dá para escolher mais do que um? mmmmm
  12. acho que o k esta a tentar é alguma coisa tipo isto: no form: <input type="checkbox" name="check[]" value="1">1<br> <input type="checkbox" name="check[]" value="2"> 2<br> <input type="checkbox" name="check[]" value="3"> 3<br> <input type="checkbox" name="check[]" value="4"> 4<br> <input type="checkbox" name="check[]" value="5"> 5<br> no envio foreach($_POST['check'] as $value) { $check_msg .= "$value, \n"; } acho que é isto que queres...
  13. while ($rows=mysql_fetch_row($result)) { $class = ( $_GET['submenu']==$rows[0] ) ? ' class="ativo" ' : ' class="ativos"'; echo '<li><a href="index.php?page=5&submenu='.$rows[0].'"'.$class.'>'.$rows[1].'</a></li>'; } já arranjei forma... fica o código para se alguém tiver o mesmo problema
  14. não o k eu quero é que ao carregar num menu esse menu fike de outra cor para o utilizador saber onde está
  15. Viva Pessoal.. será que me podem ajudar? a ideia era mais ou menos esta: <? function pgAtual($pagina){ if ($_GET['area'] == $pagina){ return ' class="active"'; }elseif (($_GET['area'] == "") && ($pagina == "olid")){ return ' class="active"'; } } ?> em que no meu menu tenho: $lang = ($_SESSION['lang']); require_once ("connect.php"); connect(); $listinsc = "SELECT id_submenu, nome_$lang FROM submenu where id_galeria=1 "; $result=mysql_query($listinsc); while ($rows=mysql_fetch_row($result)) { echo("<a href='index.php?page=5&submenu=".$rows[0]."' >".$rows[1]."</a><br> "); } ?> .active {color: black; font-weight: bold;} em que quando o utilizador escolhe o menu este envia por _GET uma variavel para activar o Css active.. em atml fica mais ou menos isto: <a href="index.php?area=teste3"<?php echo pgAtual('teste3')?>>qualquer coisa</a> mas não estou a conseguir fazer em php será que me podem ajudar, ou se souberem de uma forma mais simples? a ideia é criar um menu, onde o utilizador carrega e esse menu fica com um class diferente obrigado
  16. oi pessoal, estou com este script: <script type="text/javascript"> function fadeOut(id, time) { target = document.getElementById('alvo'); alpha = 100; timer = (time*1000)/50; var i = setInterval( function() { if (alpha <= 0) clearInterval(i); setAlpha(target, alpha); alpha -= 2; }, timer); } function fadeIn(id, time) { target = document.getElementById(id); alpha = 0; timer = (time*1000)/50; var i = setInterval( function() { if (alpha >= 100) clearInterval(i); setAlpha(target, alpha); alpha += 2; }, timer); } function setAlpha(target, alpha) { target.style.filter = "alpha(opacity="+ alpha +")"; target.style.opacity = alpha/100; } window.onload=fadeIn; </script> <body> <h1>&nbsp;</h1> <div id="exemplo"> <a href="java script:fadeOut('alvo', 0.1)" >fade out</a> | <a href="java script:fadeIn('alvo', 0.1)">fade in</a> <div id="alvo"> &nbsp;<img src="asasa.jpg" alt="" width="380" height="300" /> </div> </div> </body> o que eu queria é que sempre que a pagina abrir o conteudo da div alvo abrisse cm o fadein... pois vou ter de ter um link assim a href='index.php?page=5&submenu=$submenu&p=".$i."' utilizei este codigo: window.onload = function(){ fadeIn('alvo', 0); } mas não efectua bem.. pois primeiro mostra a imagem so depois é que faz o efeito... e reparei que não esta a dar em IE... alguém me sabe dizer porque
  17. já alterei.... está em brunovieira.com.pt/13 mas mesmo assim não dá
  18. sim penso que é assim que diz.. <!DOCTYPE html> <html> <head> <link href="layout.css" rel="stylesheet" type="text/css" /> <link href="css.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/ddaccordion.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> <script src="http://jqueryui.com/latest/ui/effects.core.js"></script> <script src="http://jqueryui.com/latest/ui/effects.slide.js"></script> <style type="text/css"> .teste { margin: 0px; width: 250px; height:700px; background-image:url(imgs/box.gif); background-repeat:no-repeat; position:absolute; z-index:1; top: 114px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> <script type="text/javascript"> $(document).ready(function(){ $("h3").click(function () { $("#alinha").fadeOut("slow"); $('#testea').show("slide", { direction: "left" }, 2000); }); }); </script> <script type="text/javascript"> ddaccordion.init({ headerclass: "expandable", //Shared CSS class name of headers group that are expandable contentclass: "categoryitems", //Shared CSS class name of contents group revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover" mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover collapseprev: true, //Collapse previous content (so only one open at any time)? true/false defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed) animatedefault: false, //Should contents open by default be animated into view? persiststate: true, //persist state of opened contents within browser session? toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"] togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs) animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow" oninit:function(headers, expandedindices){ //custom code to run when headers have initalized //do nothing }, onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed //do nothing } }) </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body > <table width="1060" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="center"><img src="imgs/logo.gif" width="388" height="103"></td> </tr> <tr> <td bgcolor="#CCCCCC"; height="600" valign="top" style="padding-top:10px"> <table width="1060" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="200" > <div id="testea" class="teste" > <?php include("munuu.php"); ?> </div></td> <td width="860"> <div id="alinha"><!-- o fade entra aqui --> <?php include("verifica_page.php");?></div></td> </tr> </table> </td> </tr> <tr> <td>&nbsp;</td> </tr> </table> </body> </html>
  19. mas continua a não me dar. por exemplo neste site lourini ele faz um fade out mas se reparar ele tem sempre #variavel... será que é isso? desde já um muito obrigado pela dica
  20. a função que eu tenho é: $(document).ready(function(){ $("h3").click(function () { $("#alinha").fadeOut("slow"); }); }); eu não sei nada de javascript mas penso que $("h3").click(function () { é quando se faz o click correcto? era isso que me queria dizer?
  21. oi pessoal, estou mesmo aflito com este bug, alguém me sabe dar uma fica...
  22. eu não quero esconder o menu. o menu sempre que eu carrego num link ele faz o que eu quero que é o slide.... o k está em falta é o fade out do conteudo que esta dendtro da DIV Alinha.. postei a pasta no servidor.. http://brunovieira.com.pt/12/ se reparar o menu esta a abrir bem, so que eu queria que quando carrego numa opção qualquer o que esta dendro la div Alinha faça fadeout e apareça o novo conteudo. se carregar por exemplo em SOFAS ele não faz o fadeout pois o link esta como <a href="index.php">SOFAS</a> mas se carregar em COLCHOES este já funciona bem e esta como <a href="#">COLCHOES</a> ou seja o problema aki acho que é o #. Há forma de eu dar a volta? já agora, estou a ver que é monitora, aconselha o curso de javascript aki do scriptbrasil? desde já um obrigado pela atenção
  23. oi pessoal, sou novo nesta area, estou a fazer um fade out ao carregar no menu, este já está a funcionar, mas so funciona quando o link no menu é somente # .... eu quero fazer tipo page.php ele ai altera o conteudo mas não faz o fade.. alguém me pode ajudar? desde já um muito obrigado pela ajuda de todos.. <!DOCTYPE html> <html> <head> <link href="layout.css" rel="stylesheet" type="text/css" /> <link href="css.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/ddaccordion.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> <script src="http://jqueryui.com/latest/ui/effects.core.js"></script> <script src="http://jqueryui.com/latest/ui/effects.slide.js"></script> <style type="text/css"> .teste { margin: 0px; width: 250px; height:700px; background-image:url(imgs/box.gif); background-repeat:no-repeat; position:absolute; z-index:1; top: 114px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> <script type="text/javascript"> $(window).load(function(){ $('#testea').show("slide", { direction: "left" }, 2000); }); $(document).ready(function(){ $("h3").click(function () { $("#alinha").fadeOut("slow"); }); }); </script> <script type="text/javascript"> ddaccordion.init({ headerclass: "expandable", //Shared CSS class name of headers group that are expandable contentclass: "categoryitems", //Shared CSS class name of contents group revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover" mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onmouseover collapseprev: true, //Collapse previous content (so only one open at any time)? true/false defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed) animatedefault: false, //Should contents open by default be animated into view? persiststate: true, //persist state of opened contents within browser session? toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"] togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs) animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow" oninit:function(headers, expandedindices){ //custom code to run when headers have initalized //do nothing }, onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed //do nothing } }) </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body > <table width="1060" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="center"><img src="imgs/logo.gif" width="388" height="103"></td> </tr> <tr> <td bgcolor="#CCCCCC"; height="600" valign="top" style="padding-top:10px"> <table width="1060" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="200" > <div id="testea" class="teste" > <table width="258" border="0" cellpadding="0" cellspacing="0" > <tr> <td width="200" valign="top" style="padding-left:70px; padding-top:20px;" > <div class="arrowlistmenu"> <h3 id="fade_out" class="link"> <a href="index.php?page=1">QUEM SOMOS</a></h3> <h2 class="menuheader expandable">MOBILIARIO</h3> <ul class="categoryitems" > <li><a href="index.php">teste</a></li> <li><a href="#">teste</a></li> </ul> <h3 class="link"><a href="index.php">SOFAS</a></h3> <h3 class="link"><a href="#">COLCHOES</a></h3> <h3 class="link"><a href="#">CONSTRU&Ccedil;&Atilde;O</a></h3> <h3 class="link"><a href="#">CONTACTOS</a></h3> </ul> </td> </tr> </table> </div></td> <td width="860"> <div id="alinha"> <!-- aqui entra um include de paginas em php --> <table width="860" border="0" cellspacing="0" cellpadding="0"> <tr> <td> teste teste teste teste teste teste </td> </tr> </table> <!-- aqui fecha um include de paginas em php --> </div></td> </tr> </table> </td> </tr> <tr> <td> </td> </tr> </table> </body> </html> não sei mesmo como alterar isso... não tem forma de ficar a funcionar? já agora estes cursos online são bens?
×
×
  • Criar Novo...