Home arrow Web Standards arrow Completing a Configuration for Chrome and a Server
WEB STANDARDS

Completing a Configuration for Chrome and a Server


In this fourth article in a four-part series on configuring Firefox for Chrome and a server, you will learn how to create a XUL file, how to make login changes, and more. This article is excerpted from chapter four of Programming Firefox, written by Kenneth C. Feldt (O'Reilly, 2007; ISBN: 0596102437). Copyright © 2007 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

Author Info:
By: O'Reilly Media
Rating: 5 stars5 stars5 stars5 stars5 stars / 8
June 26, 2008
TABLE OF CONTENTS:
  1. · Completing a Configuration for Chrome and a Server
  2. · PHP Serving XUL
  3. · Using PHP require()
  4. · Logic changes
  5. · Summary

print this article
SEARCH DEVARTICLES

Completing a Configuration for Chrome and a Server
(Page 1 of 5 )

Creating a XUL File to Be Served

The XUL source to be served will actually be sent by a PHP script—but a good first step is to develop a XUL file that we will convert into PHP.

We copy the newssearch.js and NewsSearchStyle.css files into the Apache root directory.

We will copy the newssearch.xul file but rename it to startupScreen.xul. We also change the source file to remove the login areas, replacing them with the graphics that render a successful login screen:

  <hbox id="contentArea"
   
style="borderColor:gray;
     border-style:ridge;background-color:LightSeaGreen;
     border-color:gray;" flex="3" >

   <spacer flex="1"/>
   <vbox > <!-- stack message and login controls vertically -->
     <spacer flex="1"/>
       <description id="msgDescription">
        Welcome.
       </description>
       <spacer flex="1"/>
  
</vbox>
   <spacer flex="1"/>

  </hbox>

Configuring the Server

Without “understanding” what to do with a XUL file, the Apache web server would deliver a XUL file to a browser as an XML text file. A browser receiving such a file most often just presents the source to the user of the browser.

We must add an entry to either the mime.types or the httpd.conf file for Apache:

  application/vnd.mozilla.xul+xml      xul

After making this change, restarting the web server will allow us to enter the XUL file reference URL:

  http://localhost/startupScreen.xul

The browser will now render the XUL interface shown earlier in our client/server implementation.


blog comments powered by Disqus
WEB STANDARDS ARTICLES

- Mozilla Popcorn Maker 1.0 Makes Videos More...
- Completing a Configuration for Chrome and a ...
- Getting Connected with Firefox and Chrome
- Configuring Servers and Databases with Chrome
- Configuring Firefox for Chrome and a Server
- Designing the Elements of a Web Page
- Matching div heights with CSS and JavaScript
- Forms
- Get Down With Markup
- If I Said You Had a Beautiful Body...
- Web Standards in Dreamweaver Part 3
- Web Standards in Dreamweaver, Part 2
- Web Forms
- Making Lists Using XHTML
- Web Standards in Dreamweaver, Part 1

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials