0
Welcome Guest! Login
0 items Join Now

creating a module from javascript?

  • creating a module from javascript?

    Posted 17 years 9 months ago
    • Icould have sworn I did this before, but it is not working for me now. I clicked new module, went down to the bottom and pasted my javascript in there, then saved the module, but when I published the module, thre was just a link linking to the site I got the javascript from. Did I miss a step or something? This is the javascript that I am trying to makea module out of:
      Module #1 160x600 Home weather page
       
      <div id="wx_module_3878">
      &nbsp;  <a href="http://www.weather.com/weather/local/32174">Ormond Beach Weather Forecast, FL (32174)</a>
      </div>
       
      <script type="text/javascript">
       
      &nbsp;  /* Locations can be edited manually by updating 'wx_locID' below.&nbsp; Please also update */
      &nbsp;  /* the location name and link in the above div (wx_module) to reflect any changes made. */
      &nbsp;  var wx_locID = '32174';
       
      &nbsp;  /* If you are editing locations manually and are adding multiple modules to one page, each */
      &nbsp;  /* module must have a unique div id.&nbsp; Please append a unique # to the div above, as well */
      &nbsp;  /* as the one referenced just below.&nbsp; If you use the builder to create individual modules&nbsp; */
      &nbsp;  /* you will not need to edit these parameters. */
      &nbsp;  var wx_targetDiv = 'wx_module_3878';
       
      &nbsp;  /* Please do not change the configuration value [wx_config] manually - your module */
      &nbsp;  /* will no longer function if you do.&nbsp; If at any time you wish to modify this */
      &nbsp;  /* configuration please use the graphical configuration tool found at */
      &nbsp;  /* https://registration.weather.com/ursa/wow/step2 */
      &nbsp;  var wx_config='SZ=160x600*WX=FHW*LNK=SSNL*UNT=F*BGI=country*MAP=null|null*DN=http';
       
      &nbsp;  document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.com/weather/wow/module/'+wx_locID+'?config='+wx_config+'&proto='+document.location.protocol+'&target='+wx_targetDiv+'"></scr'+'ipt>');&nbsp; 
      </script>

      Any pushes in the correct direction would be greatly appreciated:)
      David Henderson
  • Re: creating a module from javascript?

    Posted 17 years 9 months ago
    • either - turn off your wysiwyg

      or (my preference) go and find the PHP module on the JED and grab that.

      I use it for all my custom scripted modules.
    • www.ninjoomla.com - The Ninjoomla Open Source Extension Club
      Over 50 open source extensions and 100 videos to you build the site you want.
  • Re: creating a module from javascript?

    Posted 17 years 9 months ago
    • PHP module? OH what do you speak of? I am taking it by your post, if I am reading it correctly, that there is a thing in the extensions that helps with making custom modules? OR are you saying there's already a weather channel thing in the extensions?
  • Re: creating a module from javascript?

    Posted 17 years 9 months ago

Time to create page: 0.089 seconds