Simple questions about design Web app

Hello,
I’ve confused using ", ', /, , and [. would you please summarize when and
how to use them. i.e. the coding below, I do not why should use [, why use /
instead of .
“{" + Alt1 + "]”

Db := @ReplaceSubstring(@ReplaceSubstring(@Subset(@DbName;-1);“\”; “/”); "
"; “+”);

Thank you so much!

Linda

Subject: simple questions about design Web app.

Linda,

On the web, pathing typically uses /, as in HOME - VASTLY

On pc’s, pathing typically uses , as in c:\notes\data

ND6 supports @WebDbName, which will return your dbname with the correct slashes, so I’d recommend using that instead of your formula.

hth,

raphael

Subject: simple questions about design Web app.

Generally speaking the browser does not care if you use / or . Nor does Notes. The problem comes that if you get the file path from Notes it returns a \ rather than a / In most cases if you take that onto your URL it will work just fine. However, the web standard is a /.Having said that if you send the Notes FilePath with the \ in it to a BlackBerry (not sure about other handhelds) it will reject it. So now we always (well almost always) swap out the \ with a / before passing the request on. It makes no difference to Notes/Domino and most browsers, but if you are writing for BB it will not work without this change.

Subject: RE: simple questions about design Web app.

Thanks Bill. It is nice to know the difference.

I’v just read the coding below in the database, I was wondering why img needs

to put in , indt does not?

( it was weird <[ can not be added to follow img:=", so it looks like a typo)

img :=“img src ='” +“/” + Db + “/WhiteIndent.gif”+ “’ BORDER=0>]”;

indt := “”+img+“”;

Thanks,

Linda

Subject: simple questions about design Web app.

Hi Linda,

The ", ', /, , and characters are functional characters when using Domino-generated HTML:

“[” + “<img src='” + Db + “/” + ImgN1 + “?OpenImageResource’ alt='” + Alt1 + "’

border=0>]"

(Broke the string so it wouldn’t try to generate the markup in passthru…)

First, I assume that the “{” is a typo and should be a “[”…

“[” + “<img src='” + Db + “/” + ImgN1 + “?OpenImageResource’ alt='” + Alt1 + "’

border=0>]"

(Broke the string so it wouldn’t try to generate the markup in passthru…)

\ : Escape character in Formula (most of the time). See it’s usage in the examples below. To actually USE the \ character, you need to double it. Example: to get “C:\notes\data”, you must enter/generate “C:\notes\data”.

/ : URL Pathing information: http://www.dominoguru.com/index.html The “/” in the URL seperates path content: protocol + (sep + sep) + domain + sep + page

“” : Typically anything in a “” is a text string. “Blah” is a text string containing Blah.

{} : A “new” method to allow escape characters to be auto-generated as required. {The word “Blah” is a string} generates “The word "Blah" is a string”.

’ ': In markup, a doublequote ( " ) or singlequote ( ’ ) can be used to create a string. However, sometimes you may want to generate a string within a string where escape characters are not allowed to be used. For example, the markup:

When this image is clicked, it passed the string “Blah” to the dofuction(); javascript function. Just a quick example of an instance where you might have different quote types…

: in the Domino auto-generated world, anything inside of the is treated as pass-thru HTML.

So, let’s look at your string again:

“[” + “<img src='” + Db + “/” + ImgN1 + “?OpenImageResource’ alt='” + Alt1 + "’

border=0>]"

(Broke the string so it wouldn’t try to generate the markup in passthru…)

This should generate:

Some alternate text

As pass-thru HTML, if Db was “dbnamewhatever.nsf”, ImgN1 was “imageresource.gif”, and Alt1 was “Some alternate text”.

The thing to look out for, some markup elements (img happens to be one of them) can self-close:

Some image

SO… it really depends on the particular case.

HTH,

-Chris

Subject: RE: simple questions about design Web app.

Thanks for both of your responding-raphael and Chris.Thanks Chris for your details which are really helpful to understand the conception.

Once again, thanks for your kindness and all best wishes!

Linda