Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Javascripts - Enable it vis HTML code  (Read 13050 times)

0 Members and 1 Guest are viewing this topic.

tckoon

    Topic Starter


    Greenhorn

    Javascripts - Enable it vis HTML code
    « on: August 09, 2008, 10:58:04 AM »
    Hi,
    When I create a web page where involve some htlm language like "onclick" " mouseover" the javascript is require.
    So when I lauch the page, the browser will have notification bar on top, to allow or disallow the script to execute.

    But the question why when I visit other web page in Intenet including this url, it never pop up notification at all. When check on the source file ... the javascript is use too. But why ? Am I missing something here ?

    <HTML>
    <HEAD>
    <TITLE>The JavaScript Source:  Page Details:  Close Window</TITLE>
    <META HTTP-EQUIV="The JavaScript Source" CONTENT = "no-cache">
    <META NAME="date" CONTENT="2000-09-09">
    <META NAME="channel" CONTENT="Web Developer">
    <META NAME="author" CONTENT="javascriptsource.com">
    <META NAME="section" CONTENT="Page Details">
    <META NAME="description" CONTENT="JavaScript can close a window when you push a button or click a text link.  Super-short script too!">
    </HEAD>

    <BODY BGCOLOR=#ffffff vlink=#0000ff>

    <BR>
    <center>
    <script language="JavaScript" type="text/javascript"><!--
    function openDescription(ID) {

    kpac

    • Web moderator
    • Moderator


    • Hacker

    • kpacョ
    • Thanked: 184
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 7
    Re: Javascripts - Enable it vis HTML code
    « Reply #1 on: August 09, 2008, 11:15:23 AM »
    Welcome to Computer Hope. ;D

    I am not quite sure I understand you. What are you trying to do?
    Can you post the rest of the source code? Or attach it (Click on "Additional Options...") if it is too big.

    kpac

    • Web moderator
    • Moderator


    • Hacker

    • kpacョ
    • Thanked: 184
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 7
    Re: Javascripts - Enable it vis HTML code
    « Reply #2 on: August 09, 2008, 11:25:44 AM »
    Okay, I had another read of your post.

    Do you mean the bar that says: "This website wants to run scripts or active content. Click OK to run content", or something like that?

    It depends on what the script is doing, and whether you have scripts enabled in your browser or not.

    squall_01



      Prodigy

      Thanked: 80
      Re: Javascripts - Enable it vis HTML code
      « Reply #3 on: August 09, 2008, 01:59:57 PM »
      But it should still come up unless you previously said for it to use them
      Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

      If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

      tckoon

        Topic Starter


        Greenhorn

        Re: Javascripts - Enable it vis HTML code
        « Reply #4 on: August 09, 2008, 06:20:05 PM »
        Hi kpac,

        Do you mean the bar that says:
         "This website wants to run scripts or active content. Click OK to run content", or something like that? 
        < YES>
        It depends on what the script is doing, and whether you have scripts enabled in your browser or not.
        <Browser disable it >

        I visit most of URL which have feature like when mouse over the text, it change color...etc I believed it is done by javascript.
        But when I try create the same feature using MS Expression, my browser notification bar pop up the message mentioned above whe I test the web page. The same browser setting when I visited most of the url, it never have this problem.

        So what type of javascript commands that will not get blocked ?
        Or any suggestion or tips, I am very new in html.

        Thanks in advance.
        Regards

        tckoon

          Topic Starter


          Greenhorn

          Re: Javascripts - Enable it vis HTML code
          « Reply #5 on: August 09, 2008, 06:25:23 PM »
          I try the very basic javascript from http://www.w3schools.com/html/html_scripts.asp
          The same thing happen, I am sure basic java script shall not get blocked.

          <html>
          <head>
          </head>
          <body><script type="text/javascript">
          document.write("Hello World!")
          </script></body>
          </html>

          squall_01



            Prodigy

            Thanked: 80
            Re: Javascripts - Enable it vis HTML code
            « Reply #6 on: August 09, 2008, 08:08:54 PM »
            I dont think that is coded right.  You wanted a pop up didnt you here?
            Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

            If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

            tckoon

              Topic Starter


              Greenhorn

              Re: Javascripts - Enable it vis HTML code
              « Reply #7 on: August 09, 2008, 08:24:17 PM »
              attached the screen shoot.


              [recovering disk space -- attachment deleted by admin]

              squall_01



                Prodigy

                Thanked: 80
                Re: Javascripts - Enable it vis HTML code
                « Reply #8 on: August 09, 2008, 08:32:56 PM »
                I see that but I mean the above code.  Oh I realized something,but forget where I seen it about what you mean.
                Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                tckoon

                  Topic Starter


                  Greenhorn

                  Re: Javascripts - Enable it vis HTML code
                  « Reply #9 on: August 09, 2008, 09:53:02 PM »
                  Hi squall_01 ,

                  So you know what it about, do you have answer ????

                  kpac

                  • Web moderator
                  • Moderator


                  • Hacker

                  • kpacョ
                  • Thanked: 184
                    • Yes
                    • Yes
                    • Yes
                  • Certifications: List
                  • Computer: Specs
                  • Experience: Expert
                  • OS: Windows 7
                  Re: Javascripts - Enable it vis HTML code
                  « Reply #10 on: August 10, 2008, 05:15:31 AM »
                  Try saving this as "mypage.htm" and point your browser to it:

                  Code: [Select]
                  <html>
                  <head>
                    <script type="text/javascript" language="javascript"
                      function mine()
                      {
                        alert("Hello World!")
                      }
                    </script>
                  </head>

                  <body onload="mine()">
                    <p>You should get a popup saying "Hello World!".</p>
                  </body>
                  </html>

                  squall_01



                    Prodigy

                    Thanked: 80
                    Re: Javascripts - Enable it vis HTML code
                    « Reply #11 on: August 10, 2008, 06:23:22 AM »
                    Hi squall_01 ,

                    So you know what it about, do you have answer ????

                    It depends on how its coded.  I forget some where I read about it.  It usually blocks the code if it is found threating.
                    Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                    If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                    tckoon

                      Topic Starter


                      Greenhorn

                      Re: Javascripts - Enable it vis HTML code
                      « Reply #12 on: August 10, 2008, 12:24:56 PM »
                      Hi kpac,
                      Same thing happen, IE browser top message bar "IE resricted this web page for running script or active-x .....
                      After I allow it... nothing happen.

                      I just wonder why some script written not getting restricted at all.

                      Below is what I get from www.computerhope.com source, it does have javacript...but everytime I visit this url... the restriction never impose ?

                      -------------------

                      <script type="text/javascript">
                      <!--
                      function setFocus() {
                      document.search_form.q.focus();
                      }
                      // --></script>

                      -------------------------------


                      Regards

                      kpac

                      • Web moderator
                      • Moderator


                      • Hacker

                      • kpacョ
                      • Thanked: 184
                        • Yes
                        • Yes
                        • Yes
                      • Certifications: List
                      • Computer: Specs
                      • Experience: Expert
                      • OS: Windows 7
                      Re: Javascripts - Enable it vis HTML code
                      « Reply #13 on: August 10, 2008, 02:08:53 PM »
                      Have you got scripting enabled on your browser?
                      If it is not, it would disable more advanced scripts and leave out basic scripts.

                      What browser are you using?

                      CBMatt

                      • Mod & Malware Specialist


                      • Prodigy

                      • Sad and lonely...and loving every minute of it.
                      • Thanked: 167
                        • Yes
                      • Experience: Experienced
                      • OS: Windows 7
                      Re: Javascripts - Enable it vis HTML code
                      « Reply #14 on: August 11, 2008, 08:02:41 PM »
                      tckoon,
                      This behavior is normal when viewing JavaScript-coded pages offline.  If you were to upload your pages to a server and then view them, you would notice that this message no longer appears.  Basically, the only problem is that you're viewing the pages locally on your computer and not on the internet.  If you would like, you can find more information about it here:
                      http://support.microsoft.com/kb/883866



                      And by the way, you might want to ignore anything squall_01 says.  Unfortunately, he doesn't know what he's talking about when it comes to anything.
                      Quote
                      An undefined problem has an infinite number of solutions.
                      由obert A. Humphrey

                      kpac

                      • Web moderator
                      • Moderator


                      • Hacker

                      • kpacョ
                      • Thanked: 184
                        • Yes
                        • Yes
                        • Yes
                      • Certifications: List
                      • Computer: Specs
                      • Experience: Expert
                      • OS: Windows 7
                      Re: Javascripts - Enable it vis HTML code
                      « Reply #15 on: August 12, 2008, 03:15:48 AM »
                      And by the way, you might want to ignore anything squall_01 says.  Unfortunately, he doesn't know what he's talking about when it comes to anything.

                      LOL! You have some neck....! ;D

                      CBMatt

                      • Mod & Malware Specialist


                      • Prodigy

                      • Sad and lonely...and loving every minute of it.
                      • Thanked: 167
                        • Yes
                      • Experience: Experienced
                      • OS: Windows 7
                      Re: Javascripts - Enable it vis HTML code
                      « Reply #16 on: August 12, 2008, 05:21:34 AM »
                      And by the way, you might want to ignore anything squall_01 says.  Unfortunately, he doesn't know what he's talking about when it comes to anything.

                      LOL! You have some neck....! ;D

                      When I see someone constantly trying to give useless advice without having any knowledge of what they're talking about, I start to get a little irritated.  And let's face it...I can be a bit of an *censored* times as well.  Heh.
                      Quote
                      An undefined problem has an infinite number of solutions.
                      由obert A. Humphrey

                      tckoon

                        Topic Starter


                        Greenhorn

                        Re: Javascripts - Enable it vis HTML code
                        « Reply #17 on: August 12, 2008, 06:41:53 AM »
                        Thanks CBMatt  :)
                        You are right...I upload the page to my local IIS ..test it... no such problem.

                        Regards

                        squall_01



                          Prodigy

                          Thanked: 80
                          Re: Javascripts - Enable it vis HTML code
                          « Reply #18 on: August 15, 2008, 02:33:42 PM »
                          No, I forget its been a while since I messed with javascripting.  This point I dont have alot of time to do such. 
                          Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                          If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                          CBMatt

                          • Mod & Malware Specialist


                          • Prodigy

                          • Sad and lonely...and loving every minute of it.
                          • Thanked: 167
                            • Yes
                          • Experience: Experienced
                          • OS: Windows 7
                          Re: Javascripts - Enable it vis HTML code
                          « Reply #19 on: August 15, 2008, 04:08:21 PM »
                          No, I forget its been a while since I messed with javascripting.  This point I dont have alot of time to do such. 

                          Well, by reading this thread, it's obvious that you have no idea what you're talking about.  Personally, I don't think you should even bother with posting at all if you can't help.  In fact, I have never seen you actually help with anything.  I know that when you're a teenager, it's cool to look like you know everything, but you're not fooling anyone.  Maybe you should work on improving your English and wait until you're about halfway through high school before you start worrying about trying to help people.  You need to be able to help yourself first.
                          Quote
                          An undefined problem has an infinite number of solutions.
                          由obert A. Humphrey

                          squall_01



                            Prodigy

                            Thanked: 80
                            Re: Javascripts - Enable it vis HTML code
                            « Reply #20 on: August 16, 2008, 04:59:03 AM »
                            That would be funny if it where true.  I'm a collage sophmore.  I'm about twenty so it wouldnt be funny if you read some of my post.  Also, I do help people.  Just havent had any luck yet, with doing other things an problems that had been resolved I could have done.
                            Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                            If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                            CBMatt

                            • Mod & Malware Specialist


                            • Prodigy

                            • Sad and lonely...and loving every minute of it.
                            • Thanked: 167
                              • Yes
                            • Experience: Experienced
                            • OS: Windows 7
                            Re: Javascripts - Enable it vis HTML code
                            « Reply #21 on: August 16, 2008, 05:25:43 AM »
                            I don't know what kind of school you claim to go to, but most schools around here teach grammar and spelling; you may want to look into that.  Although, you did say "collage"...maybe you're just really good at pasting magazine clippings onto posterboards.  In that case, I'm very proud of you for reaching a Sophomore level of collage-making!



                            Quote
                            I'm about twenty so it wouldn't be funny if you read some of my post.
                            What post?  What in the world are you talking about?  I already don't think it's funny to read any of your posts because quite frankly, I find them to be headache-inducing.


                            You've got over 2000 posts and all you have managed to do is confuse people and get in the way.  If you have some sort of learning disability, I'm sorry that you have to struggle harder than the rest of us, but it's no excuse to continually muck things up.  Despite how it may appear, I'm a very nice guy and I generally like people, so I'm willing to give you the benefit of the doubt.  If you truly do know anything about computers and wish to help out, at least hire an interpretor so people can know what you're talking about.
                            Quote
                            An undefined problem has an infinite number of solutions.
                            由obert A. Humphrey

                            CBMatt

                            • Mod & Malware Specialist


                            • Prodigy

                            • Sad and lonely...and loving every minute of it.
                            • Thanked: 167
                              • Yes
                            • Experience: Experienced
                            • OS: Windows 7
                            Re: Javascripts - Enable it vis HTML code
                            « Reply #22 on: August 16, 2008, 05:39:47 AM »
                            To everyone who reads this: I apologize for behaving in such a manner.  This sort of discussion isn't meant to be public and I am setting a bad example here.  I'm very stressed and tired, and it's making it hard for me to keep things to myself.

                            And I apologize to you as well, Squall.  I'm not going to take back anything I said, but I am going to try to no longer perpetuate this.  If I must say something in the future, I will try to be more civil.

                            I'm going to go ahead and lock this thread so it can eventually drift away...
                            Quote
                            An undefined problem has an infinite number of solutions.
                            由obert A. Humphrey