uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
Custom HTML

Knowledge Base Lobby : uDirectory Support Conference : uDirectory Configuration Questions
Nov-23-17 10:58 PM EST
Original Message
Custom HTML
Author Bob on 09-14-2000 at 05:46 (EST)
I have the deluxe version and have encountered a fairly significant problem that I cannot resolve. When I type my HTML in the box for the header it does not recognize my line feeds. The result is that when the page is displayed, all of the HTML is strung out on one line thus making much of my code not function properly. I have tried cutting, pasting, typing one line at a time and pressing enter after every line with no avail. After it saves the HTML it strings it all out on one line. Is there a solution to this problem?

Thanks,
Bob
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Custom HTML Bill Weiner, 2000-09-14 07:30:11 (1)
            Tags Bob, 2000-09-14 15:19:43 (2)
                 RE: Tags Bill Weiner, 2000-09-15 05:58:59 (3)
                      Custom HTML & Java Bob, 2000-09-17 08:04:25 (4)
                           Custom HTML & Java Bill Weiner, 2000-09-18 05:42:29 (5)
                                Fair Enough Bob, 2000-09-18 06:30:46 (6)
                                     Dumb Question Bob, 2000-09-18 06:40:33 (7)
                                          RE: Custom HTML & Java Bill Weiner, 2000-09-18 11:06:24 (8)
                                               Hey it works Bob, 2000-09-21 07:03:21 (9)

Messages In This Discussion
         1. RE: Custom HTML
        Author Bill Weiner on 09-14-2000 at 07:30 (EST)
Those "TOP HTML", "MIDDLE HTML" and "BOTTOM HTML" fields are special fields in that you actually have to type in the HTML exactly as you want the HTML inserted on the page. That is, instead of using carriage returns to go to the next line.... you'll actually have to use the HTML tag for that:

(BR)

...where the ( ) are actually greater-than/less-than signs (this forum doesn't let me post greater-than/less than signs).
TABLE OF CONTENTS
                 2. Tags
                Author Bob on 09-14-2000 at 15:19 (EST)
How else would someone type HTML? That is exactly what I am doing. It looks fine until the admin function saves it. When the code is written to the output it strings everything accross one line. Most HTML is fine, but much of Java scripting must start on new lines.

TABLE OF CONTENTS
                         3. RE: Tags
                        Author Bill Weiner on 09-15-2000 at 05:58 (EST)
Due to the way uDirectory saves data, all carriage returns (n and r control characters) are removed from those HTML fields before the data is saved. I'm not sure how that will affect your JavaScripts, but I believe JavaScripts ignore all spaces, tabs, and newlines (except those that are part of string constants)... so maybe you can just make sure that you use a semicolon (;) after each statement.
TABLE OF CONTENTS
                                 4. Custom HTML & Java
                                Author Bob on 09-17-2000 at 08:04 (EST)
I appreciate the info, but the Java Scripts that I am using have the proper semicolons in place. They are working scripts, not new custom written scripts. Basic Java Scripts that display date and time will not work under the uDirectory logic.

I guess the larger question here is; why are you stripping those characters out? That is a guaranteed runtime error for Java Scripts. This seems rather contradictory to me because you print the uDirectory HTML portion WITH the line feeds. This can be confirmed by the print code commands in the uDirectory cgi script and by simply "viewing the source" in any browser.

In addition, I currently use a variety of Java scripts with 8 other cgi packages on several of my other sites that work fine because they allow custom HTML to be inserted in the proper format, which is the same way that they print their portion of the output pages. uDirectory is the first script package that I have seen that handles custom HTML in this fashion.

Obviously, this limitation should be explained in the sales package. For the more advanced sites, it is very important to have the option of using advanced custom HTML (which may include forms, java scripts, etc.)in the proper format.

Otherwise, perhaps there is a basic mod that will allow for inserting custom HTML and preserving the format? In other words, can we make a mod to stop the script from stripping the line feeds out and printing the HTML in the same format that it was inserted? I mean after all, you are inserting those characters when you print the uDirectory portion of the output pages. Why not treat custom HTML in the same manner? Seems like a fairly big oversight to me.

Sign Me,
Hope we can work this out!
TABLE OF CONTENTS
                                         5. Custom HTML & Java
                                        Author Bill Weiner on 09-18-2000 at 05:42 (EST)
The reason carriage returns are stripped out of the custom HTML fields is due to the way data is stored in the data files (not to be confused with the html files). That is, each configurable category field is stored on a single line in the data file separated from the data keyword via a "bar" delimiter.

As for the use of carriage returns in the custom HTML fields, regular HTML (including forms) do not use carriage returns except in some rare cases like using the "PRE" HTML tags. As for JavaScripts, for the most part, they too do not need carriage returns providing you have the proper semi-colons. In fact, are you sure it is the carriage returns that are causing the problem with your JavaScripts?

What may actually be the problem is that as part of the validation of the HTML fields, we also convert double quotes (") to single quotes ('). This was primarily done so that when you chose to "Edit" a category, the HTML is properly displayed on the "Edit" category form. For the most part, the conversion of double quotes to single quotes is transparent for the custom HTML fields...however, that has caused some problems before with others using JavaScripts... particularly if they originally had single quotes embedded between the double quotes. In that case, a little adjusting of that portion of the custom HTML can usually get around the problem.

So I would suggest submitting a support request with the JavaScript that you are trying to insert in the custom HTML fields.... along with your URL so that we can see how your HTML is being output....and then we may be able to suggest a few changes to get the script to work without the double quotes. Or at worse case, modify the validate_html() subroutine to accomodate your specific needs.
TABLE OF CONTENTS
                                                 6. Fair Enough
                                                Author Bob on 09-18-2000 at 06:30 (EST)
How do I submit a support request?
TABLE OF CONTENTS
                                                         7. Dumb Question
                                                        Author Bob on 09-18-2000 at 06:40 (EST)
I know --- dumb question. Don't reply! I figured it out.

Thanks
TABLE OF CONTENTS
                                                                 8. RE: Custom HTML & Java
                                                                Author Bill Weiner on 09-18-2000 at 11:06 (EST)
I took a look at the code you sent and I believe I see what is causing the problem.... the // comments. That is, when uDirectory strips out the carriage returns... the // comments get put on the same line...and therefore everything after the // is being treated as a comment.... Thus the resulting "QbDcTEST is not defined" JavaScript message.

So to get around that problem, just try deleting those two comment lines in the JavaScript.
TABLE OF CONTENTS
                                                                         9. Hey it works
                                                                        Author Bob on 09-21-2000 at 07:03 (EST)
Just wanted to make sure and post a concluding response in case any other folks, or prospective uDirectory buyers, are following this saga. I will take it like a man and say --- yes you were right --- the comments where the culprit in our Java Scripts and I would like to apologize for being a little testy.

Great product and super support!

Thanks a mil Bill!

Bob
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.