Members: 278  •  Posts: 12615  •  Topics: 864  •  Please welcome bosanci28, our newest member.
Please login or register.

Login with username, password and session length
 

News:

Welcome To Graphics Mayhem

collapse

Author Topic: Javascript Issue  (Read 165 times)

0 Members and 1 Guest are viewing this topic.

IBRRORG

  • Practiced
  • Offline
  • Posts: 49
  • OS:
  • Windows Vista/Server 2008
  • Browser:
  • Firefox 3.5.3
Javascript Issue
« on: October 11, 2009, 09:14:41 PM »
    Not sure if this is the right place, please move accordingly if necessary.

    So, I want to embed a weather widget into a thread.  Apparently, I can't.  I played w/adding
    Code: [Select]
    [html] and can't seem to get it right.

    Here's the code: 
    Code: [Select]
    .

    Is there a simple way to work this or make SMF read the javascript? 
    Vincit Omnia Veritas

    SoLoGHoST

    • SMF MOD Expert!
    • SoLoGHoSt
    • Connoisseur
    • Offline
    • Posts: 2143
    • OS:
    • Windows Vista/Server 2008
    • Browser:
    • Firefox 3.0.14
    Re: Javascript Issue
    « Reply #1 on: October 11, 2009, 09:38:35 PM »
      You need to link it to a .js file.  So you can grab the JS code needed for the widget and place it on your server somewhere and link the src value to this JS file.

      IBRRORG

      • Practiced
      • Offline
      • Posts: 49
      • OS:
      • Windows Vista/Server 2008
      • Browser:
      • Firefox 3.5.3
      Re: Javascript Issue
      « Reply #2 on: October 11, 2009, 10:13:59 PM »
        any recommendations on a good FAQ/tutorial where i could go read on this?  all i understood is that 'js' probably javascript.  seems like something i probably need to learn so i'd appreciate it!

        BTW the site is doing GREAT; i've been on the road working so haven't been around much.

        here's an example i found that works and am using it right now.  i'd simply like to know how to apply this type of coding to the javascript type of code:

        Code: [Select]

        Latest Knoxville, Tennessee, weather conditions and forecast
        « Last Edit: October 11, 2009, 10:45:30 PM by IBRRORG »
        Vincit Omnia Veritas

        SoLoGHoST

        • SMF MOD Expert!
        • SoLoGHoSt
        • Connoisseur
        • Offline
        • Posts: 2143
        • OS:
        • Windows Vista/Server 2008
        • Browser:
        • Firefox 3.0.14
        Re: Javascript Issue
        « Reply #3 on: October 11, 2009, 11:01:07 PM »
          Ok, in the example above you are using image src value which can link to just about anything (doesn't have to have a .js extension for it to work), however, for ';
          Than in yourScript.js, you have all of the Javascript code in there.

          Have looked at the link you are trying to using in the SRC value and what is happening is it is using a document.write(); to write out information that gets called upon from a server-side script.  So, if the functions used in the Javascript are accessing the correct URLs for retreiving the information, than it should work fine.

          Well, hopefully this makes sense to you somewhat.

          Shortie

          • Administrator
          • Expert
          • Offline
          • Posts: 3637
          • The Ultimate Boss
          • OS:
          • Windows 7/Server 2008 R2
          • Browser:
          • Firefox 3.5.3
          Re: Javascript Issue
          « Reply #4 on: October 12, 2009, 01:55:43 AM »
            Why no just use a portal Blouk like this

            Just create a Custom HTML Block and place where you want

            Shortie

            Thank You, "Guest" For Reading My Post.

            IBRRORG

            • Practiced
            • Offline
            • Posts: 49
            • OS:
            • Windows Vista/Server 2008
            • Browser:
            • Firefox 3.5.3
            Re: Javascript Issue
            « Reply #5 on: October 12, 2009, 09:27:10 AM »
              that's what i did...kinda.  it's a long story.  you know we're hobos so we have a template that is called format of posts.  each time we format a new yard we simply cut and paste.  so, i used that part of the code and it works fine.

              i am interested in learning about the code itself.  see, say i want to canibalize (sp?) a widget that is running the javascript using this kind of code.  i was hoping there is some kind of either a) converter for laymen like myself; or b) a tutorial explaining how to do it w/o having to get a crash course degree in ALL aspects of programming.

              here's how it looks as an example now:  My Example.

              « Last Edit: October 12, 2009, 09:28:52 AM by IBRRORG »
              Vincit Omnia Veritas

              IBRRORG

              • Practiced
              • Offline
              • Posts: 49
              • OS:
              • Windows Vista/Server 2008
              • Browser:
              • Firefox 3.5.3
              Re: Javascript Issue
              « Reply #6 on: October 23, 2009, 06:41:08 PM »
                sorry to resurect this, but maybe i wasn't on point.  in shortie's pic it shows the widget is written w/ a href in the beginning.  see i want to be able to convert the widgets that normally don't start that way (they start like
                can you show me how i would now convert this over to the a href style or refer me to a converter program or a web faq?  i've spent the past 5 days now trying to find such to no avail! :'(
                Vincit Omnia Veritas

                SoLoGHoST

                • SMF MOD Expert!
                • SoLoGHoSt
                • Connoisseur
                • Offline
                • Posts: 2143
                • OS:
                • Windows Vista/Server 2008
                • Browser:
                • Firefox 3.0.14
                Re: Javascript Issue
                « Reply #9 on: October 23, 2009, 07:46:41 PM »
                  Sorry, not really familiar with how widgets work online, but do you have the WIDGETBOX element defined??  Seems to be looking for WIDGETBOX, and if it is true, attempts to write something in the element called WIDGETBOX.  I could be mistaken as this could be detecting if the browser supports widgets or not.  But like I said, I never done online gadgets (otherwise known as widgets) so I'm not really sure there.  Here is some code for getting it to echo in the template file...

                  Code: [Select]
                  echo '

                  ';
                  Not sure if this helps any though.
                  « Last Edit: October 23, 2009, 07:59:25 PM by SoLoGHoST »
                   


                  Search


                  Latest Activity.
                  Novembers Graphics Mayhem Wallpaper by Shortie
                  [Today at 07:48:08 AM]


                  Need some badges... please by Green CoW
                  [Today at 04:19:17 AM]


                  Icon For Top To Link To Wiki by Shortie
                  [Today at 02:42:14 AM]


                  Windows 7 Walls by NerdBoy
                  [Yesterday at 07:51:35 PM]


                  More Distinct For SMF RC2 by the yicker
                  [Yesterday at 11:40:32 AM]


                  November's Logo Challenge "Up Top" (2009)... by NerdBoy
                  [Yesterday at 05:41:46 AM]


                  What's the deal with SMF? by NerdBoy
                  [Yesterday at 05:40:12 AM]


                  Deep Red 2 For SMF RC2 by Shortie
                  [Yesterday at 04:22:26 AM]


                  help in a photo by SoLoGHoST
                  [November 18, 2009, 08:34:10 PM]


                  Topic Count in Profiles by live627
                  [November 18, 2009, 06:14:20 PM]


                  ATI Catalyst™ version 9.11 released by Nukegaming
                  [November 18, 2009, 03:44:16 PM]


                  themed logo challenge by Shortie
                  [November 17, 2009, 02:29:20 PM]



                  Page created in 0.101 seconds with 21 queries.