Discussion Locked

Web Development Forum

0 helpful
44 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Web Development Forum
Welcome to the Web Development Forum. This is the place to post your Web development questions, share your best techniques, and express your opinion on topics that impact IT development.

We also encourage you to post your comments about the Web Development Zone TechMail.

Visit our e-newsletter subscription center to subscribe to this valuable TechMail today:
http://builder.com.com/techmails.jhtml?repID=u001

44 replies

by tnewman

I have a asp page that returns several thousand rows. The speed increase was great. How can this be done in other languages like php or jsp?

Thanks,
Todd Newman
tcnewman@yahoo.com

by phil_perkins_1

To tell you the truth, I haven't worked with PHP or JSP, but I imagine the idea is the same: Don't buffer your output. Instead of sending all the HTML from one large buffered chunk, you should be sending it as it's available. Also, the tips for generating clean HTML is to make it easy on the client to render the HTML, so you get a performance boost there. As far as data access with PHP and JSP, that's going to depend on what documentation those two offer for optimizing data performance. This is going to be anything that reduces the amount of traffic between the web server and the data server, such as wrapping up several data calls into one with better queries and such. Hope this helps.

by takinbo

I just discovered this forum and have not actually read the article. But you can also implement this in PHP and JSP. I am more familiar with PHP and I would discuss it here.

In implementing this is PHP, you would be using the Output Buffering functions in PHP. Here's an example. Basically what this involves is filling up our buffer with data and flushing the buffer to the browser when we have enough data.

Output Buffering Example

\n

\n";
echo "

\n\n";
// Flush buffer contents to the browser
ob_flush();
}?>

Firstname Lastname
" . $result['firstname'] . " " . $result['lastname'] . "

You may also want to have a look at http://www.devshed.com/Server_Side/PHP/OutputBuffering/page1.html for more information on output buffering.

Tim Akinbo

by lwoods

Showing my ignorance maybe but in the ASP page you load an xsl file named "ADOGeneric.xsl" but this file was not included in the article, nor the zipped file.

What am I missing?

by Mark W. Kaelin

Create a format mask with JavaScript:

The Feb. 18, Web Development Zone TechMail discusses controlling input with a format mask. Have you used format masks in your applications? Did you use JavaScript to accomplish it?

by mtnmann

Has anyone else tried the _Javascript code? I copied an pasted it and ran it in Netsape and IE. I may have missed some previous articles as well so I don't know how to implement "_Javascript". Anyway, I did not see any new behavior because of the_Javascript code. How is this supposed to work?

by mtnmann

As far as my previous post goes, Yahoo! Mail replaced OnKeyDown with OnFiltered and Javascript with _Javascript (security...), even in the body of the newsletter. This is why the mask didn't work for me. I corrected the syntax and it works great.Thanks Phil!

by Mark W. Kaelin

Create dynamic content with filters and transitions:

The Feb. 25 Web Development Zone TechMail discusses how to achieve graphical transition effects in Internet Explorer. Have you used Internet Explorer graphical transitions? Do you prefer graphical transitions created with more cross-platform-friendly features? Do you prefer no graphical transitions at all? Share your thoughts with the community.

by syed_ahadi

I am looking to have a new website for a small business. I would like to know if it (the website) can be designed and developed locally or from any developer elsewhere, considering I am trying to get best bargain. Please give me other specifics like where to register the domain name so as to reach a good number of search engines. Thanks & Regards. Hadi S.A.

by james

Syed,
You can have your website developed from anywhere in the World.

There are so many options that you have that can enable you to get great value for money for your small business. More importantly however, you want to ensure that you have someone that can expain different options to you in plain English. Moreover, that works/corresponds with you during the entire develpment process.

As far as Domain Name registration you can choose old faithfull www.NetSol.com at $35 US or spend about $8.75 with maddog domains: http://www.secureserver.net/default.asp?isc=mddgsd03&prog_id=maddogdomains .

Lastly your domain name registration has nothing to do with your search engine submissions. These are done seperately from your domain name. Search engine optimisation is a whole new forum in itself.

Good luck.

James Green
www.PivotalMD.com
Pivotal MArketing & Design

by Mark W. Kaelin

Immediately convert a Recordset into XML:

The March 4, Web Development Zone TechMail discusses a tool that allows you to immediately convert a Recordset into XML. How do you translate Recordsets into XML? Do you use the XSL transformations? Shareyour best practices.

by Mark W. Kaelin

Send long XML form data with XMLHTTP:

The March 11, Web Development Zone TechMail discusses sending large amounts of XML form data with XMLHTTP. Have you used XMLHTTP to send large amounts of XML data? Was it effective? Do you have a better suggestion? Tell us about it.

This discussion question was derived from a Web Development Zone TechMail. Would you like to receive an e-newsletter that discusses topics such as this on a weekly basis? Get a subscription to the free Web Development ZoneTechMail by browsing to this URL:

http://builder.com.com/techmails.jhtml?repID=u001

by Mark W. Kaelin

Create a dynamic ASP file view:

The March 18, Web Development Zone TechMail describes how to create a folder-file hierarchy in ASP. Have you used a hierarchical view before in your application interfaces? How did you do it? Will the technique described in this TechMail help you the next time you create a user interface?

If you haven't subscribed to the Web Development Zone TechMail, there is no better time to take advantage of our free e-newsletter. Visit our e-newsletter subscription center to subscribe to this valuable TechMail today:

http://builder.com.com/techmails.jhtml?repID=u001

by rthompson

This is a great process but how do you avoid the ActiveX FSO warning without forcing the user to change browser security settings?

by Mark W. Kaelin

I asked the Web Development author, Phillip Perkins, this question and he replied:

The article was intended to display a list of files and folders located on the server that would not alert the user with the cryptic message. However, this can bedone on the client side.

I would change the code around a little to begin with. I've actually done this in JavaScript. To overcome the error message or the prompt to allow scripting of ActiveX components, you could wrap the functionality in a custom control that exposes the ISafety interface.

The minor drawback to this is that you have to make sure that the browser setting for "Script ActiveX controls marked safe for scripting" is "Enable"...if set to "Prompt" the user will still be prompted with a "Allow..." box. My "safe" object also creates any object based on ProgID and returns the object reference to JavaScript. This "hack" allows anyone to create any object if they incorporate it on their web page as long as the security setting allows scripting of safe ActiveX controls. Feel free to ask me any more questions.

by blake

I was testing out this script and got the following error-

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'GetSubFolders'

/dev/test.asp, line 6

I had pasted the exact asp script that Phillip provided (with exception to the file system path in which the explorer view starts from).

Line 6 happens to be the following line of code-

Response.Write "" & GetSubFolders(folder) & ""

I have modified the script so it works almost how it is intended (using call GetSubFolders(folder)), but I am curious to why the original snippet doesn't work?.

by Mark W. Kaelin

Another member brought the error to our attention in another thread. Here is Phillip's corrected code example:

Dim sPath, fso, folder
sPath = "C:\Data\Images"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(sPath)
Response.Write "

    " & GetSubFolders(folder) & "

"

Function GetSubFolders(pfolder)
Dim sFolders, fldr, fil
sFolders = "

  • " & pfolder.Name

    If pfolder.SubFolders.Count > 0 Or pfolder.Files.Count > 0 Then _
    sFolders =sFolders & "

      "

      For Each fldr In pfolder.SubFolders
      sFolders = sFolders & GetSubFolders(fldr)
      Next

      For Each fil In pfolder.Files
      sFolders = sFolders & "

    • " & fil.Name & "
    • "
      Next

      If pfolder.SubFolders.Count > 0 Or pfolder.Files.Count > 0 Then _
      sFolders = sFolders & "

    "

    sFolders = sFolders & "

  • "

    Set fil = Nothing
    Set fldr = Nothing

    GetSubFolders = sFolders
    End Function

    Sorry for the confusion.

    by tk

    In the artcile "Use proximity to apply Fitts's User Interface Law" the author tells us to use a span with mouseover and mouse coordinates to allow a greater area to click on with selected text.

    Another way and far easier than the complicated process the author descrbes is to use style sheets. The padding attricute actually grows the clickable area. Adding [style="padding:10px;"] to the will actually create a pad of 10 pixels around the link that can be clicked.

    Trevor

    by steve.bamberger

    did you try the code in the article? I did. when you move over a number 5 for instance the number 3 and 4 and 5 get bigger and correspondingly reflow so that your mouse is now over the number 2. maybe I'm missing something, but I think this was more likely a joke about applying fits law while ignoring user testing.

    by dzejd

    Fitz's law actually describes the amount of time it takes someone to get their mouse to a spot of a particular size.

    Because this code changes the text when you mouse over it, it completely ignores the implications of Fitz's law.

    If he's interested in making informed designs based on ideas like Fitz's law, then he should perhaps spend some more time reading HCI papers. People have been dealing with these issues for years, and actually tested out which designs work better.

    by maryweilage

    There can be a problem with the code if you copy it from a Web-based e-mail client like Yahoo. When Yahoo (or whatever) created the page within its site, it changed the "onmouseover" event handler definition on the SPAN element to an "onfiltered" event handler. If you're having problem running the code, check that event handler.

    by mthiru

    hi iam thiru from india working as a web developer
    i like to know about other developers and iam also doing freelance. Iam happy to work of web related project it you are interested to share your wotk with me

    regards
    thiru

    by maryweilage

    The June 10 edition of the Web Development Zone e-newsletter discusses complex pattern matching and text manipulation with regular expressions. How do you use regular expressions in your development environment? Please let us know.

    For more information about regular expression, visit these links:

    For Perl:
    http://www.perldoc.com/perl5.6/pod/perlre.html

    For JScript or VBScript:
    http://msdn.microsoft.com/library/en-us/script56/html/js56reconIntroductionToRegularExpressions.asp

    by calrion

    I'm new to REs but have quickly seen how simple they make matching a particular pattern. One problem I do have though, is matching a particular number range as in a date or IP address, for example.

    It's easy enough to expect a digit ([0-9]), but is it possible (and if so, how) to expect a particular range of numbers, for example 16 to 37?

    I know I can say things like [1-3][0-9] but this would encompass 10 - 39, which is a little larger than intended. Any ideas?

    Calrion.

    by swstephe

    there are some things regular expressions aren't that good at, but it is possible. You probably will end up with a lot of "or"'s, (assuming your RE flavor allows them), for "16-37":

    (1[6-9]|2[0-9]|3[0-7])

    ugly ... but it works

    by maryweilage

    The June 24 edition of the Web Development Zone e-newsletter discussed how to develop Web pages that follow the guidelines of the W3C's Web Accessibility Initiative.

    For additional information on accessibility, check out the following links. (Please delete additional spaces that appear when you paste one of the links into your browser.)

    W3C's additional info on accessibility guidelines:
    http://www.w3.org/TR/WCAG10/

    Section 508:
    http://www.section508.gov/

    For accessibility features in IE:
    http://msdn.microsoft.com/workshop/browser/accessibility/accessibility_node_entry.asp

    For accessibility features in Mozilla:
    http://www.mozilla.org/projects/ui/accessibility/

    by cccasad

    Being that you are wanting to show the best way of coding the HTML I would think you would want to get people coding toward the XHTML/XML standard where your tags are in lowercase like not ... just a thought.I am still writing some of my HTML in non-standard ways but am trying to move toward the XHTML/XML movement so when new browsers start coming out in the coming years i'll be ready for it.

    by phil_perkins_1

    Best thing about browser technologies is that they make them backwards-compatible for all those lazy programmers out there. Imagine the fuss if MS or Mozilla were to make browsers that weren't backwards-compatible. There would be quite a few headaches. Yes, it's good practice to use the "new standards", but for the purpose of the article, the code was sufficient.

    by maryweilage

    The July 1 edition of the Web Development Zone e-newsletter described how to add functionality with Browser Helper Objects.

    If you'd like to learn more about BHOs, check out:
    http://msdn.microsoft.com/library/en-us/dnwebgen/html/bho.asp
    * Please delete the extra space that appears after "bh" before pasting this link into your browser.

    If you'd like to learn more about the InternetExplorer object, check out:
    http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp
    * Please delete any extra spaces that appear after you paste this link into your browser.

    by i_am_whopper

    The standards are not so much new, they are just less widely adopted.

    Some of the new standards are more important than others and should not be overlooked. For instance, not placing a document type declaration tag () at the beginning of your HTML document occasionally causes problems with some of the newer versions of web browsers.

    by setemkia

    I wish the contributing editors of this column would learn that browsers other than MSIE and non MS platforms are used by its readers. Further XMLHTTP is being supported by other browsers.

    In particular, Netscape's DevEdge website has at least one article about XMLHTTP. Unlike code presented by the past and current editor of this column, that code is cross browser compliant.

    I wonder when the editors are going to decide to stop aiding and abetting Microsoft's illegal monopoly, and stop insulting users of non MS technologies by refusing to support them. This is expecially egregious when cross browser and or cross platform alternatives exist. Please expand your horizons, guys.

    by phil_perkins_1

    XMLHTTP is an ActiveX component; thus, restricted to Windows OS'es. MSIE comes installed on Windows machines. In an earlier article, I discussed how to create an XML proxy with Java and just recently I wrote about creating an XML proxy with Flash. In a future article, I'll more than likely use the XMLHttpRequest object in Netscape. Also, here's what the article states on DevEdge:

    Remember that Windows Media Player is the only ActiveX control that Netscape 7.1 supports. Use of Microsoft'sMSXML in conjunction with use of Windows Media Player is common, particularly since both are offered to the developer community as ActiveX controls for IE browsers. In particular, the XMLHttp object is a popular one for establishing dynamic channel communication. Netscape 7.1 offers its own XMLHttpRequest object...

    The first sentence tells all.

    By far, MS provides a set of tools that help eliminate the time/effort/learning curve to develop solutions, especially for intranet applications.One's opinion on which technology to follow is one's opinion.

    by maryweilage

    The Aug. 5, 2003 Web Development Zone e-newsletter outlines how to encrypt XML data with the Tiny Encryption Algorithm, or TEA.

    How do you encrypt XML data? After reading this column, do you think you'll use TEA to add an extra layer of securityto your XML data? Please share your thoughts and insights with your peers.

    by i_am_whopper

    I was just curious as to what kind of data this technique would be useful for? If the data is important enough to encrypt, wouldn't you want to encrypt it with something uncrackable?

    Also, what advantages does this approach have over communicating via a secure channel, like HTTPS?

    by phil_perkins_1

    This could be used to secure personal data such as addresses, email addresses, etc. This is nothing more than an added layer of protection for the internet. If someone were eager enough to try to crack your data, there's a slim chance that they could. However, they would have to know the encryption algorithm that you were using in order to crack it. There are extensions to TEA that have been created to counter the crack attacks, but I've yet to try anything with them myself.

    As to using HTTPS, I would recommend using a combination of these technologies to make your data "bulletproof".

    by maryweilage

    The Aug. 12 and Aug. 19 Web Development Zone e-newsletters describe how to create an organizational chart with VML, HTML, and XML. After reading the columns, are you inspired to create an organizational chart using VML, XML, and HTML?

    For more info about MSXML v3.0, visit:
    http://msdn.microsoft.com/library/en-us/xmlsdk30/htm/xmmscxmloverview.asp

    For more info about MSXML v4.0, visit:
    http://msdn.microsoft.com/library/en-us/xmlsdk/htm/sdk_intro_6g53.asp

    For more info about VML, visit:
    http://msdn.microsoft.com/workshop/author/vml/default.asp

    For more info about SVG, visit:
    http://www.w3.org/TR/SVG/

    * Please delete extra spaces if they appear when you paste any of these URLs into your browser.

    by acanez

    I used that approach (use of VML,XML and DHTML to display orgcharts) already in my application.

    I took the idea from the following MSDN article:
    http://msdn.microsoft.com/msdnmag/issues/0300/vml2/default.aspx

    The basic approach to display everything in its right place is the use of nested tables. The VML is used only to create rounded corner boxes insted of flat sharp cornered ones, but tables can be used instead to allow other browsers to see them correctly (I use VML because I have IE as a requirement).

    In my web app, I even display the Employee's picture and other useful info inside the box. the problem with my implementation is the lack of lines to connect one "baloon" to the other. It only displays the ballons in the correct order one under the other (see the article to get an idea how it looks ... ugh!).
    Also I was not capable of displaying asistants on the correct way (under its boss to the side).

    I cannot tell if this article is doing it the same way or not, because it's not complete yet, as I write this, but I would love to see if it attacks those problems (specially the connection lines detail).

    BTW: I'm starting a rewrite of that module to attack those problems, but I'll probably drop the use of VML and do it just with tables. In this new approach I will use CSS and Javascript heavily. It will also get the XML info dinamically so you don't have to wait for the whole organization to download to see an orgchart of a specific area.

    by x99dfk

    I have been given a template in order to create a new web site. In this template are the following lines of code:

    I would like to know how to include the above mentioned file. I have tried everything I can think of but cannot seem to include the needed file. Any help is much appreciated.

    by i_am_whopper

    You syntax is correct if you are using ASP. If you are using ASP, does your container file have an .asp extension and not a .htm(l) extension?

    by phil_perkins_1

    The extension of the include file is generally irrelevent. In the most basic sense, the server will take the text from the include file and insert it into the body of the file with the tag at the tag's location. However, some servers' settings do not allow SSI's (server-side includes), because they can be a security risk. Check the settings on your server to make sure that the includes are being included.

    This discussion is closed to new replies.