VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    how do most people / developers code HTML output in their tools ?

    i am lost with that aspect of my projects. i am trying to hand write it manually but i am confused how to go about it correctly and more speedily. hence the question.

    here is what i am doing in this delph 6 project:

    1. manually enter an url-coded search string
    2. and post it in a browser window and wait for the result
    3. select and copy the returned output
    4. paste it into a listbox so i can parse the data field/values. (note, just finished the custom parser for this project)
    5. now take the parsed content and repost it in html pretty format back to (any) browser as a finished preview result

    at this point in the project, i no longer have to use a stand alone browser, i.e., Opera. i found an activex browser control (gecko) that seems to work ok, so far, in place of a stand alone browser.

    i also have step 2 incorporated into my app, so that no stand alone browser is necessary.

    this is the returned search results.

    Code:
    {"Title":"Blade Runner","Year":"1982","Rated":"R","Released":"25 Jun 1982","Runtime":"117 min","Genre":"Drama, Sci-Fi, Thriller","Director":"Ridley Scott","Writer":"Hampton Fancher (screenplay), David Webb Peoples (screenplay), Philip K. Dick (novel)","Actors":"Harrison Ford, Rutger Hauer, Sean Young, Edward James Olmos","Plot":"A blade runner must pursue and try to terminate four replicants who stole a ship in space and have returned to Earth to find their creator.","Language":"English, German, Cantonese, Japanese, Hungarian","Country":"USA, Hong Kong, UK","Awards":"Nominated for 2 Oscars. Another 10 wins & 15 nominations.","Poster":"http://ia.media-imdb.com/images/M/MV5BMTA4MDQxNTk2NDheQTJeQWpwZ15BbWU3MDE2NjIyODk@._V1_SX300.jpg","Metascore":"88","imdbRating":"8.3","imdbVotes":"357,198","imdbID":"tt0083658","Type":"movie","Response":"True"}
    and after parsing it, (the output is messy looking here) but i would like to incorporate into the app as a finished prettier preview output in HTML format in my application.

    Code:
    "Title": "Blade Runner
    "Year": "1982
    "Rated": "R
    "Released": "25 Jun 1982
    "Runtime": "117 min
    "Genre": "Drama, Sci-Fi, Thriller
    "Director": "Ridley Scott
    "Writer": "Hampton Fancher (screenplay), David Webb Peoples (screenplay), Philip K. Dick (novel)
    "Actors": "Harrison Ford, Rutger Hauer, Sean Young, Edward James Olmos
    "Plot": "A blade runner must pursue and try to terminate four replicants who stole a ship in space and have returned to Earth to find their creator.
    "Language": "English, German, Cantonese, Japanese, Hungarian
    "Country": "USA, Hong Kong, UK
    "Awards": "Nominated for 2 Oscars. Another 10 wins & 15 nominations.
    "Poster": "http://ia.media-imdb.com/images/M/MV5BMTA4MDQxNTk2NDheQTJeQWpwZ15BbWU3MDE2NjIyODk@._V1_SX300.jpg
    "Metascore": "88
    "imdbRating": "8.3
    "imdbVotes": "357,198
    "imdbID": "tt0083658
    "Type": "movie
    "Response": "movie
    its been a long time since i dived into html. so i had to refresh myself. this is what i have as a bases/template. now i need to know how to program it to incorporate the data in the above 1..5 steps, so that every time i enter a new search, the results are turned in an html format for live preview in my application.

    the template:

    Code:
    <html>
        <head>
            <title>imDB movie/tv show search viewer</title>
        </head>
        <body>
             Title: Blade Runner
             Year: 1982
             .
             .
        </body>
    </html>
    so, what do people use to get this aspect of the project completed quicker ?
    Last edited by vhelp; 26th May 2014 at 22:12.
    Quote Quote  
  2. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    The simplest way in html is to use tables. So your output could be...

    <table>
    <tr>
    <td>Title: Blade Runner</td>
    </tr>
    <tr>
    <td>Year: 1982</td>
    </tr>
    </table>

    More efficiently, since it is just one dynamic page, would be to collect the data in a database and use php/MySQL to retrieve and display. Each item title, year etc. is then a field of the db and the code looks like this:

    <?php

    /get the data from the database or from the parsed results/

    echo"<table>";
    echo"<tr>
    <td>Title: $title</td>
    </tr>";
    echo"<tr>
    <td>Year: $year</td>
    </tr>";
    echo"</table>";
    ?>
    Last edited by DB83; 27th May 2014 at 05:30. Reason: clarity
    Quote Quote