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.
}
}
Summary of Contents for HOMESITE
Page 11: ...Contents xi Table of CommandID values 310 Table of SettingID values 314 Glossary 323...
Page 12: ...xii Contents...
Page 20: ...xx About This Book...
Page 28: ...8 Chapter 1 Setting Up the Product...
Page 70: ...50 Chapter 4 Managing Files...
Page 88: ...68 Chapter 5 Writing Code and Web Content...
Page 116: ...96 Chapter 6 Editing Pages...
Page 148: ...128 Chapter 7 Using Web Development Languages...
Page 190: ...170 Chapter 11 Deploying Files...
Page 210: ...190 Chapter 12 Testing and Maintaining Web Pages...
Page 216: ...196 Chapter 13 Extending the Help System...
Page 350: ...330 Glossary...
Page 358: ...338 Index...