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

Cannot figure out how to create anchor links (Top of Page link)

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

    Cannot figure out how to create anchor links (Top of Page link)

    Hello everyone,
    This is my first post here, I have been using Alpha Anywhere at work now for about 3 weeks. For the web application project I am working on, we need to put a fairly standard type of link at the bottom of the page, a simple anchor that sends the user back to the top of the page. Now on any normal website or web application I have made before, this is incredibly simple. I would just make a normal link like this:

    Code:
    <a href="#">Back To Top</a>
    This should also work:

    Code:
    <a href="#top">Back To Top</a>
    In modern browsers, both of these should work without having to take an element that is at the top of the page and give it the ID of top, but I tried that was well, giving a container at the top of the page a "top_of_page" ID and then linking to it in the same way as above. None of these 3 things worked so I went into the developer debugging in the browser and inspected the link to find that once the page was created, the link changed itself to

    Code:
    <a href="a5res:#top_of_page">
    Now I'm just guessing, but what it seems like is happening is that Alpha thinks I am trying to link to an actual page I created in Alpha named #top_of_page.a5w or something like that, and is trying to resolve (res = resolve here maybe? that's why I thought this, but again, guessing) to that page and failing. Obviously this is such a common thing for a developer on the web to need to do that I find it doubtful that there isn't a way to do it within alpha, but I have not found anything in the documentation about this or anyone else who has encountered this problem after a couple hours of searching and reading. Now I could probably make the link to the page itself, but that is going to just act like a reload of the page, which is not what I want/what is called for. If anyone here can help me out so I can fix this for my boss this weekend and not look incompetent, I'd really appreciate it. I would really rather crawl into a hole and die than have to tell him I can't figure out how to make a damn link to the top of the page. Thanks in advance.
    Last edited by stephenirving; 12-15-2018, 02:28 PM.

    #2
    Re: Cannot figure out how to create anchor links (Top of Page link)

    something like
    document.getElementById('txt1').focus();
    on a button click

    is what I think you need, but you'll need to look at the debugger for your actual control. Someone else might be able to give you an exact answer but I think that's what you might be able to do
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

    Comment


      #3
      Re: Cannot figure out how to create anchor links (Top of Page link)

      Hi Stephen, welcome to the Alpha Forum.

      What kind of page are you working with? .html,.a5w., a UX? Where are you putting the link... and what control are you putting it into? There are so many ways to get the same thing done in Alpha... could you supply a sample of what you're working with?

      Comment


        #4
        Re: Cannot figure out how to create anchor links (Top of Page link)

        Without knowing your specifics, have a look at this.

        Your link could call a Javascript function...

        Code:
        <a onclick="goToTop()" href="#">Back To Top</a>

        Code:
        function goToTop(){
        
        	var panel = {dialog.object}.panelGetActive();
        	var id = {dialog.object}.panelGetId(panel,'body');
        	A5.u.element.setScroll(id,0,0,{animation: {allow: true, duration: 3000}});	
        	
        }
        Here is the doc for A5.u.element.setScroll...

        https://documentation.alphasoftware....l%20Method.xml

        Comment


          #5
          Re: Cannot figure out how to create anchor links (Top of Page link)

          Thanks for the replies everyone, DavidK your solution and provided documentation was exactly what I needed. Thanks so much, I really appreciate the help! You're right that there really are a ton of different ways to do things within Alpha, which is certainly a double edged sword but I am enjoying learning the platform. Anyway, thank you again for your time and help, this is my first big job out of school and I'm really nervous about proving myself at work (going well so far but I really didn't want to get hung up on something so small).

          Comment


            #6
            Re: Cannot figure out how to create anchor links (Top of Page link)

            Two more questions David,
            Just to be sure, where do you recommend I put the goToTop() function? The page I am working on is a .a5wcmp UX file. Should I create a separate .js file and then go to the Properties section of the page and add it under Javascript Linked Files, or is there somewhere else I should put it that is a better practice for something like this?

            Also, in your code is there somewhere I need to insert the names of my own objects, or can I use that code verbatim? Thanks again in advance.
            Last edited by stephenirving; 12-15-2018, 02:25 PM. Reason: One more question

            Comment


              #7
              Re: Cannot figure out how to create anchor links (Top of Page link)

              We now know you're working with a UX... so... you'd put the Javascript code into the Javascript functions section. You'll find that on the left side of your UX while editing... in the same area as Control, Properties, Data Binding, etc.

              You could use the code as is, if your controls are inside a PanelCard. The code is getting the Active PanelCard, then getting it's ID, then using that for scrolling.

              Try not to be so nervous about proving yourself. You've already done that to some extent by actually getting the job. I'd rather work a bit slower and a bit smarter... and test my work... rather than do anything else.

              Getting hung up on the small stuff is what eats away at everyone's time. Doing big stuff always seems to work out... but the little things are, for some reason, tough to do. Maybe that's because the big things are well documented... and the little things get ignored.

              Comment


                #8
                Re: Cannot figure out how to create anchor links (Top of Page link)

                Thanks for the advice David, I am sure that you are right. got your code example working in the project, you really saved me a lot of time and bother - I appreciate it

                Comment

                Working...
                X