HTTPProvider object
297
with (Application){
if (HTTPProvider.State == 0){
// Set the URL property of HTTPProvider Object.
HTTPProvider.URL = InputBox(VersionText, "Please Enter the URL.",
"http://www.yahoo.com");
// Perform HTTP Get Request
HTTPProvider.Get();
sSource = '';
if (HTTPProvider.ReasonPhrase == "OK") // Check if the requested
URL can be displayed
sSource = HTTPProvider.ReceivedStreamAsString; //Save the page
source into the string
else{
sSource = '<font size="+2" color="#0000ff" >' //If the page
cannot be displayed, post error message and show a reason.
sSource = s 'The request could not be completed:
<br><br><li>'
sSource = s HTTPProvider.Reason '.</font></
li>';
}
sMessage = "The source of the requested page has been copied
successfully,\n";
sMessage = sM 'the page now will be displayed ';
sMessage = sM 'in the browse window of \n' + Versi
'!';
MessageBox (sMessage, VersionText, 0);
}
else{
sSource = 'You are not connected to Internet properly, ';
sSource = s 'please check the connection and try again';
}
MessageBox("Some images may not be downloaded properly!","Warning!",0);
NewDocument (false); // Initialize a new document.
ActiveDocument.InsertText(sSource, false); // Insert the received
source code into new document.
CurrentView = 2;// Change to the browse mode.
}
}
Содержание HOMESITE
Страница 11: ...Contents xi Table of CommandID values 310 Table of SettingID values 314 Glossary 323...
Страница 12: ...xii Contents...
Страница 20: ...xx About This Book...
Страница 28: ...8 Chapter 1 Setting Up the Product...
Страница 70: ...50 Chapter 4 Managing Files...
Страница 88: ...68 Chapter 5 Writing Code and Web Content...
Страница 116: ...96 Chapter 6 Editing Pages...
Страница 148: ...128 Chapter 7 Using Web Development Languages...
Страница 190: ...170 Chapter 11 Deploying Files...
Страница 210: ...190 Chapter 12 Testing and Maintaining Web Pages...
Страница 216: ...196 Chapter 13 Extending the Help System...
Страница 350: ...330 Glossary...
Страница 358: ...338 Index...