Pagina 1 di 5 1 2 3 ... ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 41
  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2016
    Messaggi
    245

    [TOAST] come richiamarlo?

    Buon giorno,
    ho copiato e modificato questo codice e funziona appena il documento è caricato.
    Fin qui ok.

    Qualora volessi definire altri Toast come riesco a chiamarlo a seconda degli eventi (bottone piuttosto che emissione messaggio da PHP) e parametrizzarlo?
    Spero di essere stato chiaro e di non avere infranto regole.

    codice:
     $(document).ready(function () { // toat popup js
        $.toast({
            heading: 'Welcome to Help4All'
            , text: 'Make sure to fill your Profile Detail for E-Commerce'
            , position: 'top-right'
            , loaderBg: '#fff'
            , icon: 'warning'
    		,hideAfter: false
            
        });
     });

  2. #2
    Utente di HTML.it
    Registrato dal
    Jul 2016
    Messaggi
    245
    Allora come detto il codice sopra funziona.
    ALlora per prova ho creato questa funzione :
    codice:
    <script language="JavaScript">function xx(titolo,posl,posr) { 
        $.toast({
            heading: 'Message from Help4All'
            , text: titolo
            , position: 'top-right'
            , loaderBg: '#fff'
            , icon: 'info'
    		,hideAfter: false
    		,position: {
            left: posl,
            top: posr
        },
            
        });
    }
    Per poi richiamarla così :
    codice:
    				<script type="text/javascript">xx("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",300,300);location.href='../ampleadmin/home.php';</script>"
    che però produce questo errore :

    Uncaught ReferenceError: $ is not defined

    Cosa NON ho capito?


  3. #3
    Utente di HTML.it L'avatar di badaze
    Registrato dal
    Jun 2002
    residenza
    Lyon
    Messaggi
    5,372
    Non conosco toast ma sembra appoggiarsi sù jquery. Sicuro che quest'ultimo sia caricato ?
    Ridatemi i miei 1000 posts persi !!!!
    Non serve a nulla ottimizzare qualcosa che non funziona.
    Cerco il manuale dell'Olivetti LOGOS 80B - www.emmella.fr

  4. #4
    Utente di HTML.it
    Registrato dal
    Jul 2016
    Messaggi
    245
    Si certo è jquery...infatti la prima parte funziona perfettamente.

    quando creo la funzione mi da errore come se non fosse caricata Jquery.

    Siccome non conosco bene js pensavo di aver fatto qualche cappellata.

  5. #5
    Utente di HTML.it L'avatar di badaze
    Registrato dal
    Jun 2002
    residenza
    Lyon
    Messaggi
    5,372
    Posta tutto il codice.
    Ridatemi i miei 1000 posts persi !!!!
    Non serve a nulla ottimizzare qualcosa che non funziona.
    Cerco il manuale dell'Olivetti LOGOS 80B - www.emmella.fr

  6. #6
    Utente di HTML.it
    Registrato dal
    Jul 2016
    Messaggi
    245
    troppo grande
    comunque la libreria c'è.
    alrimenti non funzionava al termine del caricamento del documento.

    L'header.php che carico è identico come il footer.php.

    però ripeto sono poco ferrato con js.
    Ultima modifica di delpho; 06-05-2017 a 21:16

  7. #7
    Utente di HTML.it L'avatar di badaze
    Registrato dal
    Jun 2002
    residenza
    Lyon
    Messaggi
    5,372
    Guarda se il richiamo al file avviene prima del richiamo alla funzione xx.
    Ridatemi i miei 1000 posts persi !!!!
    Non serve a nulla ottimizzare qualcosa che non funziona.
    Cerco il manuale dell'Olivetti LOGOS 80B - www.emmella.fr

  8. #8
    Utente di HTML.it
    Registrato dal
    Jul 2016
    Messaggi
    245

    Parte 1

    Codice PHP:
    <?phpsession_start();if(!isset($_SESSION['ut_id'])){    header('Location: ../ita/ita.html');    exit;}require("func.php");?>
    codice HTML:
    <!DOCTYPE html>
    <html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Tell the browser to be responsive to screen width --><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content=""><meta name="author" content=""><!-- Favicon icon --><link rel="icon" type="image/png" sizes="16x16" href="../plugins/images/favicon2.png"><title>Aiutati Aiutando : Il Network in Criptovaluta</title><!-- Bootstrap Core CSS --><link href="bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"><!-- This is Sidebar menu CSS --><link href="../plugins/bower_components/sidebar-nav/dist/sidebar-nav.min.css" rel="stylesheet"><!-- xeditable css --><link href="../plugins/bower_components/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet" /><link href="../plugins/bower_components/sidebar-nav/dist/sidebar-nav.min.css" rel="stylesheet"><link href="../plugins/bower_components/footable/css/footable.core.css" rel="stylesheet"><link href="../plugins/bower_components/toast-master/css/jquery.toast.css" rel="stylesheet">
    <link rel="stylesheet" href="../plugins/bower_components/dropify/dist/css/dropify.min.css">
    <!-- This is a Animation CSS --><link href="css/animate.css" rel="stylesheet"><!-- This is a Custom CSS --><link href="css/style.css" rel="stylesheet"><!-- color CSS you can use different color css from css/colors folder --><!-- We have chosen the skin-blue (default.css) for this starter         page. However, you can choose any other skin from folder css / colors .         --><link href="css/colors/green-dark.css" id="theme" rel="stylesheet"><!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --><!-- WARNING: Respond.js doesn't work if you view the page via file:// --><!--[if lt IE 9]>      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>      <![endif]-->      </head>
    <body class="fix-sidebar"><!-- Preloader --><div class="preloader">  <svg class="circular" viewBox="25 25 50 50">    <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>  </svg></div><script>function apri(url,titolo) {     newin = window.open(url,'ITEM','scrollbars=no,resizable=yes, width=500,height=400,status=no,location=no,toolbar=no');} 
    </script><div id="wrapper"><!-- ============================================================== --> <!-- Topbar header - style you can find in pages.scssti-shopping-cart --> <!-- ============================================================== --><nav class="navbar navbar-default navbar-static-top m-b-0">  <div class="navbar-header">                <div class="top-left-part">
          <!-- Logo -->       <a class="logo" href="#"><b><img src="../plugins/images/logo.png" alt="home" /></b></a>       </div>    <ul class="nav navbar-top-links navbar-left">      <li class="dropdown"> <a class="text-center" href="https://www.facebook.com/www.help4all.eu/" target="_blank"> <strong>Follow us </strong><i class="mdi mdi-facebook-box"></i></a>      </li>
        </ul>    <ul class="nav navbar-top-links navbar-right pull-right">
          <li class="dropdown"> <a class="text-center" data-toggle="dropdown" href="#"><strong>CART </strong> <i class="mdi mdi-cart-outline"></i>        <div class="notify"> <span class="heartbit"></span> <span class="point"></span> </div>        </a>        <ul class="dropdown-menu mailbox animated bounceInDown">          <li>            <div class="drop-title">You have <?php echo usaCarrello();?> items into CART</div>          </li>          <li>            <div class="message-center"> <?php echo mostraCarrello();?> </div>          </li>          <li> <a class="text-center" href="checkout.php"> <strong>Close Order and Pay</strong> <i class="fa fa-angle-right"></i> </a> </li>        </ul>        <!-- /.dropdown-messages -->       </li>      <li class="dropdown"> <a class="dropdown waves-effect waves-light">        <button class="right-side-toggle btn-danger btn-group-lg "> Buy Product Now with E-Commerce</button>        </a> </li>      <li class="dropdown"> <a class="dropdown-toggle profile-pic" data-toggle="dropdown" href="#"> <img src="<?php echo $_SESSION['img'];?>" alt="user-img" width="36" class="img-circle"><b class="hidden-xs">Welcome, <?php echo $_SESSION['ut_ragsoc'];?></b><span class="caret"></span> </a>        <ul class="dropdown-menu dropdown-user animated flipInY">          <li>            <div class="dw-user-box">              <div class="u-img"><img src="<?php echo $_SESSION['img'];?>" alt="user" /></div>              <div class="u-text">                <h4><?php echo $_SESSION['ut_ragsoc'];?></h4>                <p class="text-muted"><?php echo $_SESSION['ut_mail'];?></p>                <a href="profilo.php" class="btn btn-rounded btn-danger btn-sm">View Profile</a></div>            </div>          </li>          <li role="separator" class="divider"></li>          <li><a href="profilo.php"><i class="ti-user"></i> Profile</a></li>          <li><a href="../php/logout.php"><i class="fa fa-power-off"></i> Logout</a></li>        </ul>        <!-- /.dropdown-user -->       </li>            <!-- /.dropdown -->    </ul>  </div>  <!-- /.navbar-header -->   <!-- /.navbar-top-links -->   <!-- /.navbar-static-side --> </nav><!-- End Top Navigation --> <!-- ============================================================== --> <!-- Left Sidebar - style you can find in sidebar.scss  --> <!-- ============================================================== --><div class="navbar-default sidebar" role="navigation">  <div class="sidebar-nav slimscrollsidebar">    <div class="sidebar-head">      <h3><span class="fa-fw open-close"><i class="ti-menu hidden-xs"></i><i class="ti-close visible-xs"></i></span> <span class="hide-menu">Navigation</span></h3>    </div>    <ul class="nav" id="side-menu">      <li class="user-pro"> <a href="#" class="waves-effect"><img src="<?php echo $_SESSION['img'];?>" alt="user-img" class="img-circle"> <span class="hide-menu"> <?php echo $_SESSION['ut_ragsoc'];?><span class="fa arrow"></span></span> </a>        <ul class="nav nav-second-level collapse" aria-expanded="false" style="height: 0px;">          <li><a href="profilo.php"><i class="ti-user"></i> <span class="hide-menu"> Profile</span></a></li>          <li><a href="uploadimg.php"><i class="ti-cloud-up"></i> <span class="hide-menu"> Upload Profile Image</span></a></li>          <li><a href="../php/logout.php"><i class="fa fa-power-off"></i> <span class="hide-menu"> Logout</span></a></li>        </ul>      </li>      <li><a href="home.php" class="waves-effect"><i class="mdi mdi-home text-danger"></i> <span class="hide-menu"> Dashboard</span></a></li>      <li class="devider"></li>      <li> <a href="#" class="waves-effect"><i class="mdi mdi-wrench fa-fw text-success"></i> <span class="hide-menu"> Utility</span></a>        <ul class="nav nav-second-level">          <li><a href="https://payeer.com/?partner=4324210" target="_blank" class="waves-effect"><i class="fa fa-credit-card text-success"></i> <span class="hide-menu"> Create Payeer Account</span></a></li>          <li><a href="https://www.paypal.com/it/signup/account" target="_blank" class="waves-effect"><i class="fa fa-credit-card text-success"></i> <span class="hide-menu"> Create PayPal Account</span></a></li>          <li><a href="trovacodope.php" class="waves-effect"><i class="fa fa-retweet text-success"></i> <span class="hide-menu"> Pay Pack</span></a></li>          <li><a href="elenco.php?tab=bro&fld=id" class="waves-effect"><i class="fa  fa-users text-success"></i> <span class="hide-menu"> Network</span></a></li>                    <!--li><a href="buttons.html"><i class="ti-layout-menu fa-fw"></i> <span class="hide-menu">Buttons</span></a></li>                            <li><a href="sweatalert.html"><i class="ti-alert fa-fw"></i> <span class="hide-menu">Sweat alert</span></a></li>                            <li><a href="user-cards.html"><i class="ti-user fa-fw"></i> <span class="hide-menu">User Cards</span></a></li>                            <li><a href="bootstrap.html"><i class="ti-rocket fa-fw"></i> <span class="hide-menu">Bootstrap UI</span></a></li-->        </ul>      </li>      <li class="devider"></li>      <li> <a href="#" class="waves-effect"><i class="mdi mdi-cash-multiple fa-fw text-danger"></i> <span class="hide-menu"> Financial Data</span></a>        <ul class="nav nav-second-level">          <li><a href="movimenti.php"><i class="fa fa-folder-open text-danger"></i> <span class="hide-menu"> Financial Extract</span></a></li>          <li><a href="movpayeer.php" class="waves-effect"><i class="fa fa-credit-card text-danger"></i> <span class="hide-menu"> Payeer</span></a></li>          <li><a href="movpaypal.php" class="waves-effect"><i class="fa fa-credit-card text-danger"></i> <span class="hide-menu"> PayPal</span></a></li>          <li><a href="movbank.php" class="waves-effect"><i class="fa fa-bank text-danger"></i> <span class="hide-menu"> Bank</span></a></li>          <li><a href="payout.php" class="waves-effect"><i class="fa fa-money text-danger"></i> <span class="hide-menu"> Payout</span></a></li>        </ul>      </li>      <li class="devider"></li>      <li> <a href="#" class="waves-effect"><i class="mdi mdi-gift text-info"></i> <span class="hide-menu"> Package</span></a>        <ul class="nav nav-second-level">          <li><a href="Pack.php" class="waves-effect"><i class="fa fa-shopping-cart text-info"></i> <span class="hide-menu"> Pack</span></a></li>          <li><a href="mypack.php" class="waves-effect"><i class="fa fa-briefcase text-info"></i> <span class="hide-menu"> My Pack</span></a></li>          <li><a href="fattura.php" class="waves-effect"><i class="fa fa-file-pdf-o text-info"></i> <span class="hide-menu"> My Invoice</span></a></li>
            </ul>      <li class="devider"></li>      <li> <a href="#" class="waves-effect"><i class="mdi mdi-cart text-success"></i> <span class="hide-menu"> Order</span></a>        <ul class="nav nav-second-level">          <li><a href="ordini.php" class="waves-effect"><i class="mdi mdi-database text-success"></i> <span class="hide-menu"> Order History</span></a></li>        </ul>      <li class="devider"></li>      <li> <a href="#" class="waves-effect"><i class="mdi mdi-ambulance text-warning"></i> <span class="hide-menu"> Charity</span></a>        <ul class="nav nav-second-level">          <li><a href="enti.php" class="waves-effect"><i class="fa fa-institution text-warning"></i> <span class="hide-menu"> Association</span></a></li>          <li><a href="donato.php" class="waves-effect"><i class="fa  fa-ticket text-warning"></i> <span class="hide-menu"> Donation</span></a></li>          <li><a href="accantonato.php" class="waves-effect"><i class="fa  fa-ticket text-warning"></i> <span class="hide-menu"> To Donate</span></a></li>          <li><a href="#" class="waves-effect"><i class="fa fa-info text-warning"></i> <span class="hide-menu"> News</span></a></li>        </ul>      </li>      <li class="devider"></li>      <li> <a href="#" class="waves-effect"><i class="fa fa-sitemap text-success"></i> <span class="hide-menu"> Became a Networker</span></a>        <ul class="nav nav-second-level">          <li><a href="http://member.paydiamond.com/register/iola33" target="_blank" class="waves-effect"><i class="fa fa-diamond text-success"></i> <span class="hide-menu"> PAYDIAMOND</span></a></li>          <li><a href="https://www.chogangroup.com/registrazione.php" target="_blank" class="waves-effect"><i class="fa fa-cloud text-success"></i> <span class="hide-menu"> CHOGAN cod:EN38E9</span></a></li>          <li><a href="#" class="waves-effect"><i class="fa fa-coffee text-success"></i> <span class="hide-menu"> ORGANO</span></a></li>          <li><a href="http://shop.sorgenta.com/registrati.php" target="_blank" class="waves-effect"><i class="fa fa-leaf text-success"></i> <span class="hide-menu"> SORGENTA cod:000486</span></a></li>
            </ul>      </li>      <li class="devider"></li>      <li><a href="info.php" class="waves-effect"><i class="fa fa-info-circle text-danger"></i> <span class="hide-menu"> About Help4All</span></a></li>    </ul>  </div></div><!-- ============================================================== --> <!-- End Left Sidebar  ti-write--> <!-- =============================================================
    Ultima modifica di delpho; 06-05-2017 a 21:57

  9. #9
    Utente di HTML.it
    Registrato dal
    Jul 2016
    Messaggi
    245

    Parte 2

    codice HTML:
    <div id="page-wrapper"><!--div class="row bg-title"--><!-- /.row -->     <!--row --> <!-- /.row --> 
    <!-- ============================================================== --> <!-- wallet, & manage users widgets --> <!-- ============================================================== --> <!-- .row --><div class="row" align="right"><!-- col-md-9 --> <!-- /col-md-9 --> <!-- col-md-3 --><div class="col-md-2 col-lg-9">  <div class="panel wallet-widgets">     <!--div class="panel-body"-->    <ul class="side-icon-text">      <li class="m-0"><a href="movimenti.php"><span class="circle circle-sm  bg-success di vm"><i class="ti-money"></i></span> <span class="di vm">        <h2 class="m-b-0"><?php echo $_SESSION['saldo'];?></h2>        <h4 class="m-t-0">Balance</h4>        </span></a></li>      <li class="m-0"><a href="elenco.php?tab=bro&fld=id"><span class="circle circle-sm bg-info di vm"><i class="fa fa-edit"></i></span> <span class="di vm">        <h2 class="m-b-0"><?php echo $_SESSION['utedir'];?></h2>        <h4 class="m-t-0">Subscription Sold</h4>        </span></a></li>      <li class="m-0"><a><span class="circle circle-sm bg-warning di vm"><i class="ti-link"></i></span> <span class="di vm">        <h2 class="m-b-0">https://www.help4all.eu/php/register.php?aff=<?php echo $_SESSION['idlavoro'];?></h2>        <h4 class="m-t-0">Your LINK</h4>        </span></a></li>          </ul>    <!--/div-->       </div>  <!-- /col-md-3 --> </div><script language="JavaScript">function xx(titolo,posl,posr) {     $.toast({        heading: 'Message from Help4All'        , text: titolo        , position: 'top-right'        , loaderBg: '#fff'        , icon: 'info'		,hideAfter: false		,position: {        left: posl,        top: posr    },            });} </script>				<script type="text/javascript">xx("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",300,300);location.href='../ampleadmin/home.php';</script>"<div class="row"></div>

  10. #10
    Utente di HTML.it
    Registrato dal
    Jul 2016
    Messaggi
    245

    Parte 3

    codice HTML:
    <div class="right-sidebar">                    <div class="slimscrollright">                        <div class="rpanel-title"> E-Commerce Pannel <span><i class="ti-close right-side-toggle"></i></span> </div>                        <div class="r-panel-body">                              <ul class="m-t-20 chatonline">                                <li><b>Product Category</b></li>                                <li>                                <a href="organo.php"><img src="../plugins/images/ORGANO.jpg" alt="user-img" > <span><strong>ORGANO 10% Save</strong></span></a>                                </li>                                <li>                                <a href="chogan.php"><img src="../plugins/images/chogan.png" alt="user-img"> <span><strong>CHOGAN 30% Save</strong></span></a>                                </li>                                <li>                                <a href="pm.php"><img src="../plugins/images/pblogo.jpg" alt="user-img"> <span><strong>PB 50% Save</strong></span></a>                                </li>								<li>                                <a href="sorgenta.php"><img src="../plugins/images/sorgenta.jpg" alt="user-img"> <span><strong>SORGENTA 30% Save</strong></span></a>                                </li>
                                </ul>                        </div>                    </div>                </div>            <footer class="footer text-center"> 2017 &copy; Help4All </footer>        </div>        <!-- ============================================================== -->        <!-- End Page Content -->        <!-- ============================================================== -->    </div>    </div><!-- /#wrapper --> <!-- jQuery --> <script src="../plugins/bower_components/jquery/dist/jquery.min.js"></script> <!-- Bootstrap Core JavaScript --> <script src="bootstrap/dist/js/bootstrap.min.js"></script> <!-- Sidebar menu plugin JavaScript --> <script src="../plugins/bower_components/sidebar-nav/dist/sidebar-nav.min.js"></script> <script src="../plugins/bower_components/footable/js/footable.all.min.js"></script><script src="../plugins/bower_components/bootstrap-select/bootstrap-select.min.js" type="text/javascript"></script><script src="js/jasny-bootstrap.js"></script><!--Slimscroll JavaScript For custom scroll--> <script src="js/jquery.slimscroll.js"></script> <!--Wave Effects --> <script src="js/waves.js"></script> <!-- Custom Theme JavaScript --> <script src="js/custom.js"></script><script src="js/h4atoast.js"></script>     <!-- jQuery file upload -->    <!--Style Switcher --><script src="../plugins/bower_components/toast-master/js/jquery.toast.js"></script>   <!--Style Switcher -->
    </body></html>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.