Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

a5w_Include("header.a5w") or building out each page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    a5w_Include("header.a5w") or building out each page

    I have commonly created a page named header.a5w and then used a5w_include("header.a5w") on all of my pages. That is very convenient as it places a consistent header area on top of all of my pages, includes the main navigation bar, header graphic, logged-in information, etc.

    But this method also causes problems. The resulting page in a browser will have two full sets of html tags html, body, title, etc.

    Under most circumstances this redundancy does not really hurt anything, even though it is technically malformed. But it does affect the page if you have some of the higher level features like show/hide controls in a Dialog. And it does not work well if you are going to set up the page with css layout.

    I was curious what others do - do most of you build each page as a complete unit (even if you start with a template) and NOT bring in any other page as the header (or footer).
    Steve Wood
    See my profile on IADN


    #2
    Re: a5w_Include("header.a5w") or building out each page

    Most of my pages also include PageTop.A5w and PageBottom.A5w. In a couple larger apps, I also have PageTopAdmin.A5w, for instance.

    I've never really worried about the double tags, though don't like 'em and have to keep in mind that the 2nd one usually takes precedence over the first.

    I learned to do this when I had about 40 pages up & running for a company that then went and changed its name, address and logo. I had to edit every one of those pages, and determined then that I wouldn't do that ever again.
    -Steve
    sigpic

    Comment


      #3
      Re: a5w_Include("header.a5w") or building out each page

      Steve and Steve,

      You should have come to the conference! I showed a way to resolve that problem. Perhaps for a fee.....;)

      Actually, I used to put the header and footer on separate pages, but I've since moved to using session variables to hold logo names, sizes, background colors, footer color and text, etc. I got away from it because it confuses the placement of the JavaScript and some things (like show hide) stop working.

      Between that and CSS, I can redo a site with 100's of pages in a couple hours.

      Nowdays, I just use the include for Xbasic like checking and refreshing those session variables.

      Pat
      Pat Bremkamp
      MindKicks Consulting

      Comment


        #4
        Re: a5w_Include("header.a5w") or building out each page

        "Perhaps for a fee.....". I'll remember that.
        Steve Wood
        See my profile on IADN

        Comment


          #5
          Re: a5w_Include("header.a5w") or building out each page

          If you are including a standard header or footer, you should always make sure that the included A5W page is not a complete HTML document, but only contains the subset of HTML tags to make a complete and valid document once it is included. By not doing this, you will get unpredictable display and functionality in various browsers. To do this, make sure you don't edit the A5W page to be included in a WYSIWYG editor.

          Lenny Forziati
          Vice President, Internet Products and Technical Services
          Alpha Software Corporation

          Comment


            #6
            Re: a5w_Include("header.a5w") or building out each page

            Lenny,

            Understood, but that is difficult as the header (or my header) includes both component code and body html. That is, it has contents inside of all of the various main html tags -- its a complete page. So my include cannot contain only a subset of html. I guess to continue with this method I would have to create two or more "header" files and include them in the appropriate spot on each page.
            Steve Wood
            See my profile on IADN

            Comment


              #7
              Re: a5w_Include("header.a5w") or building out each page

              Here's what I do (for what it's worth)

              At the top of every page is
              Code:
               
              <%a5 a5w_include("SessionVarTest.a5w") %>
              This is an Xbasic only page that tests for existance of session variables and renews if they don't exist.

              Code:
               
              <%a5
              '==== get section info into session variables if needed
              'If eval_valid("session.section.number")=.f.
               Dim session.section as p
               stbl=table.open("[PathAlias.ADB_Path]\version")
               stbl.fetch_goto(1)
               session.section.version = alltrim(stbl.Ver_no)
               session.section.number = alltrim(stbl.En_id)
               session.section.name = alltrim(stbl.En_name)
               session.section.address = alltrim(stbl.En_adr1)
               session.section.citystzip = alltrim(stbl.En_city)+", "+alltrim(stbl.En_state)+" "+alltrim(stbl.En_zip)+"-"+stbl.En_zip4
               session.section.logoname = alltrim(stbl.Logoname)
               session.section.logohigh = alltrim(stbl.Logohigh)
               session.section.logowide = alltrim(stbl.Logowide)
               session.section.logoalt = alltrim(stbl.Logoalt)
               session.section.footer1 = alltrim(stbl.En_footer1)
               session.section.footer2 = alltrim(stbl.En_footer2)
               session.section.footer3 = alltrim(stbl.En_footer3)
               session.section.homepage = alltrim(stbl.En_website)
               stbl.close()
              'end if
              if eval_valid("session.__protected__UserID") = .t. .and. eval_valid("session.__protected__Username")=.f.
               Dim session.pe as p
               ptbl=table.open("[PathAlias.ADB_Path]\People")
               ptbl.order("Pe_Id")
               ptbl.fetch_find(alltrim(session.__protected__UserId))
               session.__protected__UserName = alltrim(ptbl.Pe_dear)
               session.pe.firstname = alltrim(ptbl.Pe_fn)
               session.pe.lastname = alltrim(ptbl.Pe_ln)
               session.pe.company = alltrim(ptbl.Wk_CoName)
               session.pe.status = alltrim(ptbl.Ev_status)
               session.pe.number = alltrim(ptbl.Pe_number)
               session.pe.needs = alltrim(ptbl.Ev_Needs)
               ptbl.close()
              end if
              %>
              Then for the header, I use
              Code:
               
              <div id="header">
              <img id="toppic" height="<%a5 ?session.section.logohigh %>" src="<%a5 ?session.section.logoname %>.jpg"
               width="<%a5 ?session.section.logowide %>" alt="<%a5 ?session.section.logoalt %>" />
              </div><!-- end header -->
              and the footer is
              Code:
               
              <div id="footer">
              <img id="alphalogo" height="44px" src="CSS/ASQ/alphalogo.png" width="108px" alt="Powered by AlphaFive" />
              <ul class="footer">
              <li>Copyright&#169 <%a5 ?session.section.footer1 %></li>
              <li><%a5 ?session.section.footer2 %></li>
              <li><%a5 ?session.section.footer3 %></li>
              </ul>
              </div><!-- end footer -->
              Then, anywhere the section name, address, wesite, or user info etc are needed, I use the session variable.

              So, I change the style sheet, update the "version" table, and I have a new website.

              Pat
              Pat Bremkamp
              MindKicks Consulting

              Comment


                #8
                Re: a5w_Include(&quot;header.a5w&quot;) or building out each page

                Thanks - I took a full-day class on CSS last week. Best thing I could have done short of attending the conference, which I hear was a great success. I actually wanted to go, and about registered late, but I also just spent over $6000 on airfair to take the family overseas in October, and had a harder time than normal justifying the additional cost.
                Steve Wood
                See my profile on IADN

                Comment


                  #9
                  Re: a5w_Include(&quot;header.a5w&quot;) or building out each page

                  Pat, for the items that are not user specific (logo, footer, etc.) you might look at using Server variables. This would let you store the values once at the server level instead of having to recreate them for every session.

                  -Lenny

                  Lenny Forziati
                  Vice President, Internet Products and Technical Services
                  Alpha Software Corporation

                  Comment

                  Working...
                  X