Can I use a temp file with client-side JavaScript?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Don

    #16
    Re: Can I use a temp file with client-side JavaScript?

    On Thu, 16 Sep 2004 20:03:50 GMT, "McKirahan" <News@McKirahan .com>
    wrote:
    [color=blue]
    >"Don" <no@adr.com> wrote in message
    >news:fqpjk0lp3 34nqtse3qsfc582 svtiv1ncit@4ax. com...[color=green]
    >> On Thu, 16 Sep 2004 12:18:46 -0700, Don <no@adr.com> wrote:
    >>[color=darkred]
    >> >On Thu, 16 Sep 2004 18:59:57 GMT, "McKirahan" <News@McKirahan .com>
    >> >wrote:
    >> >
    >> >>[snip]
    >> >>
    >> >>> I'm sorry I haven't been clear enough on what I'm trying to do.
    >> >>> Here's an outline:
    >> >>> - page will run on client's machine from host
    >> >>> - page does the following:
    >> >>> - reads a specific web page
    >> >>> - modifies that page (none of my code presented to you has
    >> >>> addressed this step yet.)
    >> >>> - then presents the modified page to the client in the same browser
    >> >>> window opened by this page in the first place.
    >> >>>
    >> >>> I hope this is clearer.
    >> >>> Thanks for your help.
    >> >>> Don
    >> >>>
    >> >>>
    >> >>> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    >> >>> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    >> >>> -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
    >> >>
    >> >>Can you describe an example of this? Thanks.
    >> >>
    >> >I'm not sure I've seen something like this before. What I'm trying to
    >> >do is provide a better presentation of an exsisting aviation chat
    >> >group message page, including a way to attach images. The existing
    >> >chat message page is very primitive. On my modified page I will have
    >> >a form allowing the client to add images before he clicks to post the
    >> >message. My script will copy the images to my host server, where a
    >> >PHP script will store it on the server. This client-side script I am
    >> >trying to write will also build in the html code to reference the
    >> >images. Then it will actually post it just as normal chat messages
    >> >are posted.
    >> >
    >> >In the client-side script you are helping me with, I just need to get
    >> >past the point where I can read the chat index page, and be able to
    >> >display it in the same browser window the script itself is running in.
    >> >Note, the script we are working with doesn't actually reference the
    >> >chat page, but instead contains just test data.
    >> >
    >> >Does this help?
    >> >Don
    >> >
    >> >
    >> >-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    >> >http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    >> >-----== Over 100,000 Newsgroups - 19 Different Servers! =-----[/color]
    >>
    >> I just don't understand why "strPageBod y" in the script below was null
    >> after the read. If I could only get this script working, I think I'd
    >> have the battle won.
    >>[color=darkred]
    >> >>> <html>
    >> >>> <head>
    >> >>> <title>Test</title>
    >> >>> <meta http-equiv="Content-Type" content="text/html;
    >> >>> charset=iso-8859-1">
    >> >>> </head>
    >> >>> <body>
    >> >>> <script language="JavaS cript" type="text/javascript">
    >> >>> <!--
    >> >>> //
    >> >>> var strPageURL = [];
    >> >>> var strPageBody = [];
    >> >>> //
    >> >>> // Get page
    >> >>> //
    >> >>> strPageURL = "http://silvereaglenest .com/htmltestpage.ht m";
    >> >>> get_page (strPageURL);
    >> >>> //
    >> >>> // Display page
    >> >>> //
    >> >>> alert ("Body just before display: "+strPageBo dy);
    >> >>> var wind = window.open();
    >> >>> wind.document.w rite(strPageBod y);
    >> >>> //
    >> >>> //
    >> >>> function get_page(strPag eURL)
    >> >>> {
    >> >>> var userName;
    >> >>> var password;
    >> >>> //
    >> >>> alert ("URL at start of function: "+strPageUR L);
    >> >>> alert ("Body at start of function: "+strPageBo dy);
    >> >>> var xmlhttp = new ActiveXObject(" Microsoft.XMLHT TP");
    >> >>> xmlhttp.Open("G et",strPageURL, false);
    >> >>> xmlhttp.send();
    >> >>> strPageBody = xmlhttp.respons eBody;
    >> >>> alert ("Body at end of function: "+strPageBo dy);
    >> >>> }
    >> >>> //-->
    >> >>> </script>
    >> >>> </body>
    >> >>> </html>[/color]
    >>
    >>
    >> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    >> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    >> -----== Over 100,000 Newsgroups - 19 Different Servers! =-----[/color]
    >
    >Change ".responseB ody" to ".responseText" .
    >
    >
    >Save the following as "test.js" then double-click on it.
    >
    >var sURL = "http://www.Google.com/index.html";
    >var xmlhttp = new ActiveXObject(" Msxml2.XMLHTTP. 3.0");
    > xmlhttp.open("G ET", sURL, false);
    > xmlhttp.send();
    >WScript.Echo(x mlhttp.response Body);
    >WScript.Echo(x mlhttp.response Text);
    >
    >
    >Take a look at this link:
    >
    >http://msdn.microsoft.com/library/de...us/xmlsdk/html
    >/xmproresponsebo dyixmlhttpreque st.asp
    >
    >Under "Remarks" (for ResponseBody) it states:
    >
    >"This contains the raw undecoded bytes as received directly from the
    >server."
    >[/color]
    That's it, you've got it! I changed it in the following script, and
    it works just great now. THANK YOU! THANK YOU!

    I was hoping to have the display occur on the same browser window that
    this page runs under, so the client can utilize the "back" button if
    he wants. Any idea how to do that?

    Thanks much for all your help. Sure nice to have these newsgroups.
    Don't know what I'd do without them.

    Don


    <html>
    <head>
    <title>Test</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    </head>
    <body>
    <script language="JavaS cript" type="text/javascript">
    <!--
    //
    //
    var strPageURL = [];
    var strPageBody = [];
    //
    // Get page
    //
    strPageURL = "http://silvereaglenest .com/htmltestpage.ht m/";
    get_page (strPageURL);
    //
    // Display page
    //
    alert ("Body just before display: "+strPageBo dy);
    var wind = window.open();
    wind.document.w rite(strPageBod y);
    //
    //
    //
    function get_page(strPag eURL)
    {
    var userName;
    var password;
    //
    // Get page
    //
    alert ("URL at start of function: "+strPageUR L);
    alert ("Body at start of function: "+strPageBo dy);
    var xmlhttp = new ActiveXObject(" Microsoft.XMLHT TP");
    xmlhttp.Open("G et",strPageURL, false);
    xmlhttp.send();
    strPageBody = xmlhttp.respons eText;
    alert ("Body at end of function: "+strPageBo dy);
    }
    //-->
    </script>
    </body>
    </html>




    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

    Comment

    • McKirahan

      #17
      Re: Can I use a temp file with client-side JavaScript?

      "Don" <no@adr.com> wrote in message
      news:lbtjk0pkpd 0905j1hir34903t ur4savom1@4ax.c om...[color=blue]
      > On Thu, 16 Sep 2004 20:03:50 GMT, "McKirahan" <News@McKirahan .com>
      > wrote:[/color]

      [snip]
      [color=blue]
      > That's it, you've got it! I changed it in the following script, and
      > it works just great now. THANK YOU! THANK YOU!
      >
      > I was hoping to have the display occur on the same browser window that
      > this page runs under, so the client can utilize the "back" button if
      > he wants. Any idea how to do that?
      >
      > Thanks much for all your help. Sure nice to have these newsgroups.
      > Don't know what I'd do without them.
      >
      > Don[/color]

      To have the back button enabled write something to the current page then
      have the script do a "document.write ()" instead of "wind.document. write()".

      Try the following "as-is"; watch for word-wrap.

      <html>
      <head>
      <title>Test</title>
      <script type="text/javascript">
      var strPageURL = "http://silvereaglenest .com/htmltestpage.ht m";
      function get_page(URL) {
      var xmlhttp = new ActiveXObject(" Microsoft.XMLHT TP");
      xmlhttp.Open("G et",URL,false );
      xmlhttp.send();
      return xmlhttp.respons eText;
      }
      function put_page() {
      var strPageBody = get_page(strPag eURL);
      alert(strPageBo dy);
      document.write( strPageBody);
      }
      </script>
      </head>
      <body>
      <a href="javascrip t:put_page()">C lick Me!</a>
      </body>
      </html>


      May I point out the foillowing about your code:

      1) you don't need:

      language="JavaS cript"
      <!--
      // -->

      2) When you use a function() you "return" a value not set a global
      variable from within it.

      3) Similarly, the function's parameter diesn't have to be a global
      variable.

      4) Why are you doing this? (See my code above.)

      var strPageURL = [];
      var strPageBody = [];

      5) Why are these declared? They're not used:

      var userName;
      var password;

      6) Omit the trailing "/" from "strPageURL " as it causes a 404 error.

      7) Use indentation under <script> for readability.


      Comment

      • Don

        #18
        Re: Can I use a temp file with client-side JavaScript?

        On Thu, 16 Sep 2004 13:29:31 -0700, Don <no@adr.com> wrote:

        Well, when I execute the script from the host, I get an "Error:
        Permission Denied" on the following statement "var xmlhttp = new
        ActiveXObject(" Microsoft.XMLHT TP")". Looks like my desktop doesn't
        want to execut an ActiveXObject from a page originating elsewhere. I
        have my browser's security setting on Medium.

        Don


        -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
        http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
        -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

        Comment

        • McKirahan

          #19
          Re: Can I use a temp file with client-side JavaScript?

          "Don" <no@adr.com> wrote in message
          news:mp1kk05hrh 9gnfvdte115rrbu dc12qa2vm@4ax.c om...[color=blue]
          > On Thu, 16 Sep 2004 13:29:31 -0700, Don <no@adr.com> wrote:
          >
          > Well, when I execute the script from the host, I get an "Error:
          > Permission Denied" on the following statement "var xmlhttp = new
          > ActiveXObject(" Microsoft.XMLHT TP")". Looks like my desktop doesn't
          > want to execut an ActiveXObject from a page originating elsewhere. I
          > have my browser's security setting on Medium.
          >
          > Don
          >
          >
          > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
          > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
          > -----== Over 100,000 Newsgroups - 19 Different Servers! =-----[/color]

          Instead of
          Microsoft.XMLHT TP
          try
          MSXML2.XMLHTTP
          or
          MSXML2.ServerXM LHTTP
          or
          MSXML2.XMLHTTP. 3.0


          Comment

          • Don

            #20
            Re: Can I use a temp file with client-side JavaScript?

            On Thu, 16 Sep 2004 21:47:45 GMT, "McKirahan" <News@McKirahan .com>
            wrote:
            [color=blue]
            >"Don" <no@adr.com> wrote in message
            >news:mp1kk05hr h9gnfvdte115rrb udc12qa2vm@4ax. com...[color=green]
            >> On Thu, 16 Sep 2004 13:29:31 -0700, Don <no@adr.com> wrote:
            >>
            >> Well, when I execute the script from the host, I get an "Error:
            >> Permission Denied" on the following statement "var xmlhttp = new
            >> ActiveXObject(" Microsoft.XMLHT TP")". Looks like my desktop doesn't
            >> want to execut an ActiveXObject from a page originating elsewhere. I
            >> have my browser's security setting on Medium.
            >>
            >> Don
            >>
            >>
            >> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
            >> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
            >> -----== Over 100,000 Newsgroups - 19 Different Servers! =-----[/color]
            >
            >Instead of
            > Microsoft.XMLHT TP
            >try
            > MSXML2.XMLHTTP
            >or
            > MSXML2.ServerXM LHTTP
            >or
            > MSXML2.XMLHTTP. 3.0
            >[/color]
            Tried them. None of them work. Same error msg, except for
            "MSXML2.ServerX MLHTTP" which produces "Error: Object doesn't support
            this property or method"

            Don


            -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
            http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
            -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

            Comment

            • McKirahan

              #21
              Re: Can I use a temp file with client-side JavaScript?

              "Don" <no@adr.com> wrote in message
              news:8u7kk01iq4 3hkc0un2emlpcnn a23c4cd3b@4ax.c om...[color=blue]
              > On Thu, 16 Sep 2004 21:47:45 GMT, "McKirahan" <News@McKirahan .com>
              > wrote:
              >[color=green]
              > >"Don" <no@adr.com> wrote in message
              > >news:mp1kk05hr h9gnfvdte115rrb udc12qa2vm@4ax. com...[color=darkred]
              > >> On Thu, 16 Sep 2004 13:29:31 -0700, Don <no@adr.com> wrote:
              > >>
              > >> Well, when I execute the script from the host, I get an "Error:
              > >> Permission Denied" on the following statement "var xmlhttp = new
              > >> ActiveXObject(" Microsoft.XMLHT TP")". Looks like my desktop doesn't
              > >> want to execut an ActiveXObject from a page originating elsewhere. I
              > >> have my browser's security setting on Medium.
              > >>
              > >> Don
              > >>
              > >>
              > >> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
              > >> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
              > >> -----== Over 100,000 Newsgroups - 19 Different Servers! =-----[/color]
              > >
              > >Instead of
              > > Microsoft.XMLHT TP
              > >try
              > > MSXML2.XMLHTTP
              > >or
              > > MSXML2.ServerXM LHTTP
              > >or
              > > MSXML2.XMLHTTP. 3.0
              > >[/color]
              > Tried them. None of them work. Same error msg, except for
              > "MSXML2.ServerX MLHTTP" which produces "Error: Object doesn't support
              > this property or method"
              >
              > Don
              >
              >
              > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
              > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
              > -----== Over 100,000 Newsgroups - 19 Different Servers! =-----[/color]

              I'd start a new post asking your question with detail about the environment.


              Comment

              • Steve van Dongen

                #22
                Re: Can I use a temp file with client-side JavaScript?

                Don <no@adr.com> wrote:
                [color=blue]
                >On Thu, 16 Sep 2004 21:47:45 GMT, "McKirahan" <News@McKirahan .com>
                >wrote:
                >[color=green]
                >>"Don" <no@adr.com> wrote in message
                >>news:mp1kk05h rh9gnfvdte115rr budc12qa2vm@4ax .com...
                >>Instead of
                >> Microsoft.XMLHT TP
                >>try
                >> MSXML2.XMLHTTP
                >>or
                >> MSXML2.ServerXM LHTTP
                >>or
                >> MSXML2.XMLHTTP. 3.0
                >>[/color]
                >Tried them. None of them work. Same error msg, except for
                >"MSXML2.Server XMLHTTP" which produces "Error: Object doesn't support
                >this property or method"[/color]

                Method's and properties became case sensitive in later versions of
                MSXML. Open should be open.

                Regards,
                Steve

                Comment

                • Don

                  #23
                  Re: Can I use a temp file with client-side JavaScript?

                  On Thu, 16 Sep 2004 21:33:43 GMT, "McKirahan" <News@McKirahan .com>
                  wrote:
                  [color=blue]
                  >"Don" <no@adr.com> wrote in message
                  >news:lbtjk0pkp d0905j1hir34903 tur4savom1@4ax. com...[color=green]
                  >> On Thu, 16 Sep 2004 20:03:50 GMT, "McKirahan" <News@McKirahan .com>
                  >> wrote:[/color]
                  >
                  >[snip]
                  >[color=green]
                  >> That's it, you've got it! I changed it in the following script, and
                  >> it works just great now. THANK YOU! THANK YOU!
                  >>
                  >> I was hoping to have the display occur on the same browser window that
                  >> this page runs under, so the client can utilize the "back" button if
                  >> he wants. Any idea how to do that?
                  >>
                  >> Thanks much for all your help. Sure nice to have these newsgroups.
                  >> Don't know what I'd do without them.
                  >>
                  >> Don[/color]
                  >
                  >To have the back button enabled write something to the current page then
                  >have the script do a "document.write ()" instead of "wind.document. write()".
                  >
                  >Try the following "as-is"; watch for word-wrap.
                  >
                  ><html>
                  ><head>
                  ><title>Test</title>
                  ><script type="text/javascript">
                  >var strPageURL = "http://silvereaglenest .com/htmltestpage.ht m";
                  >function get_page(URL) {
                  > var xmlhttp = new ActiveXObject(" Microsoft.XMLHT TP");
                  > xmlhttp.Open("G et",URL,false );
                  > xmlhttp.send();
                  > return xmlhttp.respons eText;
                  >}
                  >function put_page() {
                  > var strPageBody = get_page(strPag eURL);
                  > alert(strPageBo dy);
                  > document.write( strPageBody);
                  >}
                  ></script>
                  ></head>
                  ><body>
                  ><a href="javascrip t:put_page()">C lick Me!</a>
                  ></body>
                  ></html>
                  >
                  >
                  >May I point out the foillowing about your code:
                  >
                  >1) you don't need:
                  >
                  > language="JavaS cript"
                  > <!--
                  > // -->
                  >
                  >2) When you use a function() you "return" a value not set a global
                  >variable from within it.
                  >
                  >3) Similarly, the function's parameter diesn't have to be a global
                  >variable.
                  >
                  >4) Why are you doing this? (See my code above.)
                  >
                  > var strPageURL = [];
                  > var strPageBody = [];
                  >
                  >5) Why are these declared? They're not used:
                  >
                  > var userName;
                  > var password;
                  >
                  >6) Omit the trailing "/" from "strPageURL " as it causes a 404 error.
                  >
                  >7) Use indentation under <script> for readability.
                  >[/color]
                  Hi McKirahan,

                  Sorry I didn't reply earlier, but my wife and I just got back from
                  spending the weekend with our children in California.

                  I tried your code above, and find it works fine as long as it is run
                  from my desktop. But,I get an "Error: Permission denied" when I run
                  it from my host server. Sure wish I could get that working, as I
                  think I've got just about everything else under control.

                  Thanks also for your comments on the code. I don't have that much
                  experience with JS yet. So, I do appreciate your help very much.

                  Don


                  -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
                  http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
                  -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

                  Comment

                  • McKirahan

                    #24
                    Re: Can I use a temp file with client-side JavaScript?

                    "Don" <no@adr.com> wrote in message
                    news:3uavk0ds8s 5aqgi9fbraov4fs n1n5tmtfj@4ax.c om...[color=blue]
                    > On Thu, 16 Sep 2004 21:33:43 GMT, "McKirahan" <News@McKirahan .com>
                    > wrote:[/color]

                    [snip]
                    [color=blue]
                    > Hi McKirahan,
                    >
                    > Sorry I didn't reply earlier, but my wife and I just got back from
                    > spending the weekend with our children in California.
                    >
                    > I tried your code above, and find it works fine as long as it is run
                    > from my desktop. But,I get an "Error: Permission denied" when I run
                    > it from my host server. Sure wish I could get that working, as I
                    > think I've got just about everything else under control.
                    >
                    > Thanks also for your comments on the code. I don't have that much
                    > experience with JS yet. So, I do appreciate your help very much.
                    >
                    > Don[/color]

                    When I run it via

                    I get the following dialog:

                    "This page is accessing information that is not under its control.
                    This poses a security risk. Do you want to continue? [Yes] [No]"

                    If I click "No" then I get your "Permission denied" error on the following
                    line:

                    xmlhttp.Open("G et",URL,false );

                    [ I have Microsoft's Visual Studio installed so I am offered the option to
                    debug. ]

                    Basically, its saying that pages running under the Web server do not have
                    access to this object.

                    I've only used this technique inside of scripts not hosted Web pages.

                    You might experiment with changing your browser's security settings.


                    Comment

                    • Don

                      #25
                      Re: Can I use a temp file with client-side JavaScript?

                      On 16 Sep 2004 08:40:49 -0700, Lee <REM0VElbspamtr ap@cox.net> wrote:
                      [color=blue]
                      >Don said:
                      >[color=green]
                      >>
                      >>Well, I'm making progress, but have a little problem with the
                      >>following embedded script. It's supposed to read the body of a page
                      >>into an array, then open a window on which it is then displayed. I
                      >>have some debug "alert" statements embedded, and find the page body
                      >>(strPageBod y) is null after being read from the web site.[/color]
                      >
                      >[color=green]
                      >><html>
                      >><head>
                      >><title>Test </title>
                      >><meta http-equiv="Content-Type" content="text/html;
                      >>charset=iso-8859-1">
                      >></head>
                      >><body>
                      >><script language="JavaS cript" type="text/javascript">
                      >><!--[/color]
                      >
                      >Get rid of that comment and it's mate. They're not needed, anymore.
                      >
                      >[color=green]
                      >>//
                      >> var strPageURL = [];
                      >> var strPageBody = [];[/color]
                      >
                      >Here, you're declaring these variables as local arrays.
                      >Later you assign a string (not array) value to strPageURL,
                      >but you never assign any value to the local strPageBody.
                      >In the function get_page(), you assign a string value to an
                      >entirely different global variable with the same name.
                      >
                      >The simplest fix is to simply remove the line declaring
                      >strPageBody to be a local array. That way, only the global
                      >variable (containing a string) will exist, and that turns out
                      >to be what you want, in this case.
                      >
                      >[color=green]
                      >>//
                      >>// Get page
                      >>//
                      >> strPageURL = "http://silvereaglenest .com/htmltestpage.ht m";
                      >> get_page (strPageURL);
                      >>//
                      >>// Display page
                      >>//
                      >> alert ("Body just before display: "+strPageBo dy);
                      >> var wind = window.open();
                      >> wind.document.w rite(strPageBod y);[/color]
                      >
                      >It's not safe to try to write into a window that you've just
                      >opened. The operating system may not have actually opened
                      >the new window, yet, at the time that you try to access its
                      >document. Use:
                      >
                      > window.open("ja vascript:opener .strPageBody");
                      >
                      >That will allow the new window to reach back into the current
                      >window and load the value of the *global* strPageBody variable
                      >as its content.
                      >
                      >
                      >
                      >[color=green]
                      >>//
                      >>//
                      >> function get_page(strPag eURL)
                      >> {
                      >> var userName;
                      >> var password;
                      >> //
                      >> alert ("URL at start of function: "+strPageUR L);
                      >> alert ("Body at start of function: "+strPageBo dy);
                      >> var xmlhttp = new ActiveXObject(" Microsoft.XMLHT TP");
                      >> xmlhttp.Open("G et",strPageURL, false);
                      >> xmlhttp.send();
                      >> strPageBody = xmlhttp.respons eBody;
                      >> alert ("Body at end of function: "+strPageBo dy);
                      >> }
                      >>//-->
                      >></script>
                      >></body>
                      >></html>[/color][/color]

                      I tried the "window.open("j avascript:opene r.strPageBody") and it
                      worked much better. Thanks. Also, thanks for the other suggestions.

                      The ony problem I think I've got left is that I get "Error: Permission
                      denied" when I run the page from my host server. Do you have any idea
                      how I can deal with this?

                      Thanks, Don



                      -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
                      http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
                      -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

                      Comment

                      • Don

                        #26
                        Re: Can I use a temp file with client-side JavaScript?

                        On Tue, 21 Sep 2004 11:50:05 GMT, "McKirahan" <News@McKirahan .com>
                        wrote:
                        [color=blue]
                        >"Don" <no@adr.com> wrote in message
                        >news:3uavk0ds8 s5aqgi9fbraov4f sn1n5tmtfj@4ax. com...[color=green]
                        >> On Thu, 16 Sep 2004 21:33:43 GMT, "McKirahan" <News@McKirahan .com>
                        >> wrote:[/color]
                        >
                        >[snip]
                        >[color=green]
                        >> Hi McKirahan,
                        >>
                        >> Sorry I didn't reply earlier, but my wife and I just got back from
                        >> spending the weekend with our children in California.
                        >>
                        >> I tried your code above, and find it works fine as long as it is run
                        >> from my desktop. But,I get an "Error: Permission denied" when I run
                        >> it from my host server. Sure wish I could get that working, as I
                        >> think I've got just about everything else under control.
                        >>
                        >> Thanks also for your comments on the code. I don't have that much
                        >> experience with JS yet. So, I do appreciate your help very much.
                        >>
                        >> Don[/color]
                        >
                        >When I run it via
                        > http://localhost/Test.htm
                        >I get the following dialog:
                        >
                        >"This page is accessing information that is not under its control.
                        >This poses a security risk. Do you want to continue? [Yes] [No]"
                        >
                        >If I click "No" then I get your "Permission denied" error on the following
                        >line:
                        >
                        > xmlhttp.Open("G et",URL,false );
                        >
                        >[ I have Microsoft's Visual Studio installed so I am offered the option to
                        >debug. ]
                        >
                        >Basically, its saying that pages running under the Web server do not have
                        >access to this object.
                        >
                        >I've only used this technique inside of scripts not hosted Web pages.
                        >
                        >You might experiment with changing your browser's security settings.
                        >[/color]

                        OK. I'll try some other things. Thanks very much for your help.

                        Don



                        -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
                        http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
                        -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

                        Comment

                        • Don

                          #27
                          Re: Can I use a temp file with client-side JavaScript?

                          On Fri, 17 Sep 2004 06:47:32 GMT, Steve van Dongen
                          <stevevd@hotmai l.com> wrote:
                          [color=blue]
                          >Don <no@adr.com> wrote:
                          >[color=green]
                          >>On Thu, 16 Sep 2004 21:47:45 GMT, "McKirahan" <News@McKirahan .com>
                          >>wrote:
                          >>[color=darkred]
                          >>>"Don" <no@adr.com> wrote in message
                          >>>news:mp1kk05 hrh9gnfvdte115r rbudc12qa2vm@4a x.com...
                          >>>Instead of
                          >>> Microsoft.XMLHT TP
                          >>>try
                          >>> MSXML2.XMLHTTP
                          >>>or
                          >>> MSXML2.ServerXM LHTTP
                          >>>or
                          >>> MSXML2.XMLHTTP. 3.0
                          >>>[/color]
                          >>Tried them. None of them work. Same error msg, except for
                          >>"MSXML2.Serve rXMLHTTP" which produces "Error: Object doesn't support
                          >>this property or method"[/color]
                          >
                          >Method's and properties became case sensitive in later versions of
                          >MSXML. Open should be open.
                          >
                          >Regards,
                          >Steve[/color]
                          Thanks Steve.
                          Regards,
                          Don


                          -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
                          http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
                          -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

                          Comment

                          Working...