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 13003 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.
                      —Robert A. Humphrey