Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-09-2012, 12:02 AM   PM User | #16
nomanic
Regular Coder

 
nomanic's Avatar
 
Join Date: Feb 2009
Location: United Kingdom
Posts: 252
Thanks: 9
Thanked 33 Times in 33 Posts
nomanic is an unknown quantity at this point
text file (page.txt) -
http://www.google.com

in your bottom frame load this page-
Code:
<script type="text/javascript">
var json,iC=false,dsTA=[],dTA=[],cTA=[],rTA=[],ajs=[],qwt=-1,htp=(document.all)?(new ActiveXObject("Microsoft.XMLHTTP")):(new XMLHttpRequest());
l_8=function(r){return r?r.length:0;};
sT=function(n,t){return setTimeout(n?n:"",(t?t:10));};
ob=function(o,q){return (typeof o==='string')?((o==='')?q:document.getElementById(o)):o;};
sC=function(w,r,f){cTA.push(w);rTA.push(r);ajs.push(f);if(qwt!==-1){clearTimeout(qwt);}qwt=sT("cQ();",100);};
cQ=function(w,r){if(!iC&&(l_8(cTA)>0)){w=cTA.shift();r=rTA.shift();iC=true;htp.open('post',w);eval("htp.onreadystatechange="+r);htp.send(null);}qwt=(l_8(cTA)>0)?sT("cQ();",5000):-1;};


caller2=function() {
    if (htp.readyState===4){
        iC=false;
        ft=ajs.shift();
        location.href=htp.responseText;
    }
};
sC("page.txt",caller2,[]);
</script>
if you wanted to pass parameters, pass the name of the text file, assuming its going to change everytime
__________________
<DmncAtrny> I will write on a huge cement block "BY ACCEPTING THIS BRICK THROUGH YOUR WINDOW, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE INSTALLATION OF THIS BRICK INTO YOUR BUILDING."
<DmncAtrny> And then hurl it through the window of a Sony officer
<DmncAtrny> and run like hell

Portfolio, Tutorials - http://www.nomanic.biz/
nomanic is offline   Reply With Quote
Users who have thanked nomanic for this post:
SpongeRob (10-09-2012)
Old 10-09-2012, 12:37 AM   PM User | #17
patryk
Regular Coder

 
patryk's Avatar
 
Join Date: Oct 2012
Location: /dev/couch
Posts: 395
Thanks: 2
Thanked 64 Times in 64 Posts
patryk is on a distinguished road
and this will access txt file on client's computer?....cmon
patryk is offline   Reply With Quote
Old 10-09-2012, 11:07 AM   PM User | #18
SpongeRob
New Coder

 
Join Date: Mar 2012
Location: North West
Posts: 14
Thanks: 6
Thanked 0 Times in 0 Posts
SpongeRob is an unknown quantity at this point
Quote:
Originally Posted by nomanic View Post
text file (page.txt) -
http://www.google.com

in your bottom frame load this page-
Code:
<script type="text/javascript">
var json,iC=false,dsTA=[],dTA=[],cTA=[],rTA=[],ajs=[],qwt=-1,htp=(document.all)?(new ActiveXObject("Microsoft.XMLHTTP")):(new XMLHttpRequest());
l_8=function(r){return r?r.length:0;};
sT=function(n,t){return setTimeout(n?n:"",(t?t:10));};
ob=function(o,q){return (typeof o==='string')?((o==='')?q:document.getElementById(o)):o;};
sC=function(w,r,f){cTA.push(w);rTA.push(r);ajs.push(f);if(qwt!==-1){clearTimeout(qwt);}qwt=sT("cQ();",100);};
cQ=function(w,r){if(!iC&&(l_8(cTA)>0)){w=cTA.shift();r=rTA.shift();iC=true;htp.open('post',w);eval("htp.onreadystatechange="+r);htp.send(null);}qwt=(l_8(cTA)>0)?sT("cQ();",5000):-1;};


caller2=function() {
    if (htp.readyState===4){
        iC=false;
        ft=ajs.shift();
        location.href=htp.responseText;
    }
};
sC("page.txt",caller2,[]);
</script>
if you wanted to pass parameters, pass the name of the text file, assuming its going to change everytime
Thank-you very much Nomanic this solution is working and reading the URL from the text file!

I really appreciate everybodies input, and fantastic help. Thanks guys.
SpongeRob is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:33 AM.


Advertisement
Log in to turn off these ads.