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

Display image named in current record

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

    #16
    Re: Display image named in current record

    I'd keep the space out of this too:

    <div id = "d1">

    should be:

    <div id="d1">
    -Steve
    sigpic

    Comment


      #17
      Re: Display image named in current record

      Im struggling with this issue myself at the moment
      sorry to ask the obvious (because it wasnt obvious to me when I started)
      is your image folder under the document root?

      Comment


        #18
        Re: Display image named in current record

        Thank you all for your responses.

        James - No it is a fully qualified path on a mapped network drive.
        Steve - Took out the space but still no image.
        Chad - Tried in all Caps but still no image.

        I think my problem is before any code, because Bob's video shows a picture place holder upper right outside of Detail grid. I don't have that, and the video didn't show how that image field got there as the grids were already set up at start of video.
        Possibly a very basic item I am missing, or is the div putting that there?

        TIA

        Ian B

        Comment


          #19
          Re: Display image named in current record

          You really need to put your code here, so we don't have to guess.
          Insanity: doing the same thing over and over again and expecting different results.
          Albert Einstein, (attributed)
          US (German-born) physicist (1879 - 1955)

          Comment


            #20
            Re: Display image named in current record

            Perhaps Bob could upload his grid for you

            Chad

            Sorry Bob I shouldn't have put you on the spot like that , you have helped enough already
            Last edited by chadbrown; 02-17-2010, 12:38 AM. Reason: update
            Chad Brown

            Comment


              #21
              Re: Display image named in current record

              Again, thank you all for your interest.
              Peter - The only code I can offer is that in a previous posts shown below.
              Free form area = <div id = "d1"></div>
              OnDetailViewRender
              Java code
              var img={grid.Object}._getValue('D','ImagePath',1);
              $('d1').innerHTML = '<img src='+img+' />';
              When I mentioned "before code" I really meant more basic than the code.

              As a beginner I must acknowledge your contributions, they give me something to aspire to, be a few years yet I suspect!

              Cheers

              Ian B

              Comment


                #22
                Re: Display image named in current record

                Attached are two screenshots that show where and how you're getting to the code to insert the <div>.
                -Steve
                sigpic

                Comment


                  #23
                  Re: Display image named in current record

                  Sort of simular to this but probably different.

                  I want to be able to show a PDF document that is tied to a record. The document will be PDF of operator manuals for specific mfgs/models of medical devices.
                  I would either like to have the document (operator manual) displayed to the side of a record or have it opened when a button is clicked.

                  I will be using the database for nursing to use as an on-line reference source.

                  Comment


                    #24
                    Re: Display image named in current record

                    OK ... a couple of things here.

                    Code:
                    OnDetailViewRender
                    Java code
                    var img={grid.Object}._getValue('D','ImagePath',1);
                    $('d1').innerHTML = '<img src='+img+' />';
                    First off .. we're writing JavaScript code here not Java code .. they are VERY different!

                    Next, as in all of my videos, if you see all UPPERCASE it's probably for a reason. I actually prefer to code in all lowercase and CamelCase for functions/variables, etc. Remember JavaScript is CASE SENSITIVE!

                    So .. 'ImagePath' in this case should be referring to a field name in the Detail View. If it is, then the way to reference this field in the .getValue method is 'IMAGEPATH' not 'ImagePath'. Upper case to reference the field names in JavaScript .. this is an Alpha Five convention.

                    Also, make sure you have a Detail View, since we are using 'D' for the grid part field source. If you want to use the Grid then you need to use 'G' here and you would move the event code to the onRowRender event or the onGridRender event.

                    Now let's talk about the most fundamental technique in JavaScript to aid you in debugging. It's the alert function. I use this quite a bit. So if you want to make sure the event you are targeting is firing, just add something like:

                    Code:
                    alert('onDetailViewRender Event Fired');
                    to the JavaScript tied to the event. This will bring up a message box when the event fires. Alert also can show you the contents of your JavaScript variables. You could add something like :

                    Code:
                    alert('onDetailViewRender Event Fired : img = '+img);
                    to see what is really stored in the JavaScript variable img.

                    Hope that helps.
                    Bob Moore


                    Comment


                      #25
                      Re: Display image named in current record

                      I am this close to being able to show a .pdf in a freeform region based on a grid list. But once again my javascript is falling short.

                      I'm basically using Bob's method here. This one's hard-coded:

                      Code:
                      $('p1').innerHTML = '<object data='vendorlist.pdf' type='application/pdf' width='500' height='650' border='1'>';
                      But no matter what I do I get an error:

                      Expected ';'

                      What's wrong with this syntax?

                      If I try to run it anyway, it completely and immediately dumps Firefox.
                      -Steve
                      sigpic

                      Comment


                        #26
                        Re: Display image named in current record

                        I think you may need to open a PDF file in an iframe.

                        Anyway .. also, embed double quotes inside the Javascript single quoted string:

                        $('p1').innerHTML = '<object data="vendorlist.pdf" type="application/pdf" width="500" height="650" border="1">';
                        Bob Moore


                        Comment


                          #27
                          Re: Display image named in current record

                          I can hard-code all of this -- just having trouble driving it with javascript. Workin' at it...

                          Bob - the suggestion you gave me below results in error "Unterminated String Constant"
                          -Steve
                          sigpic

                          Comment


                            #28
                            Re: Display image named in current record

                            Again, thanks to all of you for your interest, nearly there I think!
                            Using Bob's suggestions, I removed the detail grid and moved back to the main grid using on row click, and now get the result shown in the attached bmp.
                            This confirms I have picked up the image (although I need to code to pick up the clicked row) but I still get the strange text from the "freeform edit region - right of grid", to the right of grid which should in fact show an image place holder.
                            I think once this is answered, it should work fine.

                            TIA

                            Ian B

                            Comment


                              #29
                              Re: Display image named in current record

                              I dunno. I've spent too many hours trying to make this work, and all I get is errors and Firefox dumping me out. If anyone knows how to fix this line of javascript then I believe I have the pdf display problem licked:

                              Code:
                              $('p1').innerHTML='<object data="vendorlist.pdf" type="application/pdf" width="500" height="650" border="1">';
                              More specifically, I'm going to need something like this:

                              Code:
                              $('p1').innerHTML='<object data="'+pdfname+'" type="application/pdf" width="500" height="650" border="1">';
                              -Steve
                              sigpic

                              Comment


                                #30
                                Re: Display image named in current record

                                I don't think you can load a PDF through the innerHTML property.

                                See this link for further info :

                                http://msdn.microsoft.com/en-us/libr...97(VS.85).aspx
                                Bob Moore


                                Comment

                                Working...
                                X