Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    Scrivere un link con Javascript in un return

    Salve, vorrei far scrivere a Javascript con return un link, è possibile? Se sì, come?

    Grazie.
    www.sfondicellulare.eu

  2. #2
    Frontend samurai L'avatar di fcaldera
    Registrato dal
    Feb 2003
    Messaggi
    12,924
    puoi riformulare la domanda in modo più esplicativo e con un esempio pratico?
    Vuoi aiutare la riforestazione responsabile?

    Iscriviti a Ecologi e inizia a rimuovere la tua impronta ecologica (30 alberi extra usando il referral)

  3. #3
    Certo, io in Javascript ho ad un certo punto un
    return variabile;
    che mi scrive la variabile in un determinato punto della pagina.
    Vorrei che oltre la variabile postasse un link.
    Quello che otterrei con
    return variabile+'testo'; se l'HTML funzionasse in Javascript...

    Spero di essere stato chiaro!

    Grazie per la pazienza
    www.sfondicellulare.eu

  4. #4
    Moderatore di Annunci siti web, Offro lavoro/collaborazione, Cerco lavoro L'avatar di cavicchiandrea
    Registrato dal
    Aug 2001
    Messaggi
    26,133
    Vediamo la pagina completae e l'attuale funzione che valorizza la variabile (molto gradito un link per vedere il tutto in funzione) attuale e come vorresti modificarla
    Cavicchi Andrea
    Problemi con javascript, jquery, ajax clicca qui

  5. #5
    Il sorgente della pagina è il seguente:
    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
        <link rel="apple-touch-icon-precomposed"
              href="/lib/images/apple-touch-icon.png" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
                      	  	  	  	  	  	  <title>Halloween - Sfondi per Cellulare</title>	  <meta name="keywords" content="Halloween, sfondi, cellulare, gratis, mobile, dispositivi" /><meta name="Description" content="Halloween - " />	  	                        
        <link rel="stylesheet" type="text/css" href="/modules/gallery/css/gallery.css" />
    
    <link rel="alternate" type="application/rss+xml" href="/rss/feed/gallery/album/159" /><script type="text/javascript" src="/lib/jquery.cookie.js"></script>
    <link rel="stylesheet" type="text/css" href="/lib/uploadify/uploadify.css" />
    
    <link rel="stylesheet" type="text/css" href="/modules/user/css/user.css" />
    <script type="text/javascript" src="/modules/user/js/password_strength.js"></script>
    
    <link rel="stylesheet" type="text/css" href="/modules/comment/css/comment.css" />
    <script type="text/javascript" src="/modules/comment/js/comment.js"></script>
    
    <link rel="stylesheet" type="text/css" href="/lib/jquery.autocomplete.css" />
    <script type="text/javascript" src="/lib/jquery.autocomplete.js"></script>
    <link rel="stylesheet" type="text/css" href="/modules/tag/css/tag.css" />
    
    <link rel="stylesheet" type="text/css" href="/modules/themedispatcher/css/themedispatcher.css" />
        <link rel="stylesheet" type="text/css" href="/themes/imobile/css/imobile.css" />
        <link rel="stylesheet" type="text/css" href="/themes/imobile/css/photoswipe.css" />
        <script type="text/javascript" src="/themes/imobile/js/klass.min.js"></script>
        <script type="text/javascript" src="/themes/imobile/js/code.photoswipe-2.1.6.min.js"></script>
        <script type="text/javascript" src="/themes/imobile/js/imobile-1.0.1.min.js"></script>
      </head>
              <body onload="init()">
    
                    
      <div class="toolbar" id="thumbs-toolbar-top">
                          Festività
                      <div class="center">
              Halloween        </div>
                          Login
                </div>
    
    	
      <div id="thumbs-container">
        <div id="thumbs-images-container"></div>
        <div id="thumbs-load-more" onclick="thumbmgr.LoadMoreThumbs();">Caricane altri...</div>	
      </div>
      <div id="thumbs-footer">
        <div id="thumbs-count-text"></div>
         
          <form action="/search" id="g-quick-search-form">
            <input type=search name="q" id="g-search" placeholder="Cerca nella galleria">
          </form>
    
          </div>
      <script type="text/javascript">
       var images = [
                             { url: '/var/resizes/Festivita/Halloween/halloween-fantasma-happy-halloween.JPG?m=1323345311', thumburl: '/var/thumbs/Festivita/Halloween/halloween-fantasma-happy-halloween.JPG?m=1323345310', caption: "halloween-fantasma-happy-halloween", type: 'image', style: 'width:75px;left:0px;top:-18,890977443609px;'},                      { url: '/var/resizes/Festivita/Halloween/halloween-casa-infestata-cartone.JPG?m=1323345318', thumburl: '/var/thumbs/Festivita/Halloween/halloween-casa-infestata-cartone.JPG?m=1323345317', caption: "halloween-casa-infestata-cartone", type: 'image', style: 'width:75px;left:0px;top:-18,890977443609px;'},                      { url: '/var/resizes/Festivita/Halloween/halloween-casa-infestata-zucche-albero-secco.JPG?m=1323345319', thumburl: '/var/thumbs/Festivita/Halloween/halloween-casa-infestata-zucche-albero-secco.JPG?m=1323345318', caption: "halloween-casa-infestata-zucche-albero-secco", type: 'image', style: 'width:75px;left:0px;top:-18,890977443609px;'},                      { url: '/var/resizes/Festivita/Halloween/halloween-animation-studio-casa-infestata.JPG?m=1323345320', thumburl: '/var/thumbs/Festivita/Halloween/halloween-animation-studio-casa-infestata.JPG?m=1323345318', caption: "halloween-animation-studio-casa-infestata", type: 'image', style: 'width:75px;left:0px;top:-18,890977443609px;'},                      { url: '/var/resizes/Festivita/Halloween/halloween-happy-halloween-zucca.JPG?m=1323345321', thumburl: '/var/thumbs/Festivita/Halloween/halloween-happy-halloween-zucca.JPG?m=1323345320', caption: "halloween-happy-halloween-zucca", type: 'image', style: 'width:75px;left:0px;top:-18,890977443609px;'},                      { url: '/var/resizes/Festivita/Halloween/halloween-fantasma-trick-or-treat.JPG?m=1323345327', thumburl: '/var/thumbs/Festivita/Halloween/halloween-fantasma-trick-or-treat.JPG?m=1323345326', caption: "halloween-fantasma-trick-or-treat", type: 'image', style: 'width:75px;left:0px;top:-18,890977443609px;'},                      { url: '/var/resizes/Festivita/Halloween/halloween-notte-pipistrelli-luna.JPG?m=1323345327', thumburl: '/var/thumbs/Festivita/Halloween/halloween-notte-pipistrelli-luna.JPG?m=1323345326', caption: "halloween-notte-pipistrelli-luna", type: 'image', style: 'width:75px;left:0px;top:-18,890977443609px;'},                      { url: '/var/resizes/Festivita/Halloween/halloween-zucca-sfondo-arancione.PNG?m=1323345334', thumburl: '/var/thumbs/Festivita/Halloween/halloween-zucca-sfondo-arancione.PNG?m=1323345332', caption: "halloween-zucca-sfondo-arancione", type: 'image', style: 'width:75px;left:0px;top:-18,890977443609px;'},                      { url: '/var/resizes/Festivita/Halloween/halloween-teschio-corvo-matita.JPG?m=1323345336', thumburl: '/var/thumbs/Festivita/Halloween/halloween-teschio-corvo-matita.JPG?m=1323345336', caption: "halloween-teschio-corvo-matita", type: 'image', style: 'width:75px;left:0px;top:-18,890977443609px;'},             ];
       	var MAX_LOADING_THUMBNAILS = 16;
          var BASE_URL = '/themes/wind/../imobile/images/';
       var MAX_CONCURENT_LOADING_THUMBNAILS = 4;
    
       var thumbmgr, slidemgr;
    
       function init()
       {
          //prepare and load thumbnails
          var dao = new Jph_Dao();
          for (var i in images) {
             dao.ReadImage(
                i, 
                images[i].url,
                images[i].thumburl,
                images[i].caption,
                images[i].type,
                images[i].style
             );
          }
    
          thumbmgr = new Jph_Application(dao);
          thumbmgr.Init();
    
          // prepare slideshow
          var options = {
             getImageSource: function(obj){
                return obj.url;
             },
             getImageCaption: function(obj){
    	    var newSfondicell = images[i].thumburl.split('/');
                return obj.caption+'Download';
             },
             getImageMetaData: function(obj){
                return {
                   type: obj.type,
                   thumburl: obj.thumburl,
                }
            },
          };
          slidemgr = window.Code.PhotoSwipe.attach( 
             images, 
             options 
          );
       }	  
      </script>
    
            
    <script src="http://e.cooliris.com/slideshow/v/37732/go.js" type="text/javascript"></script>
    <div class="g-themedispatcher">Mobile | Versione completa </div>  </body>
    La pagina è per dispositivi mobili.
    Ho lasciato return obj.caption+'Download'; per farvi capire.
    Vorrei che oltre obj.caption desse anche un link funzionante che permetta il download.

    Spero che così sia più chiaro...
    Grazie.
    www.sfondicellulare.eu

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.