×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Home Screen Mini View

    Hi i am developing CMS system where student could check time schedule for classes. how could i approach to achieve this all.


    How to design mini view which update his/her time schedule according to day e,g if its Monday mini view should show the time for Monday. Keep update by the day.

    i m using PHP script to fetch his/her time table from mysql database.

    Login Page --> test.php

    how to show php data in html page coz i dont wana php page to be viewd but just to use it as script and redirect to html page itself upon some condition or true.

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Home Screen Mini View

    Hi kiakeroo,

    on client side, you should use the XMLHttpRequest object to connect to the PHP page, download the schedule data, and then use it to create the widget's mini-view.

    On server side, you PHP script should retrieve this data from your MySQL server and then send it to the client by using a suitable data format: usually, JSON or XML.

    If the schedules are mantained into separate HTML files, you could simply redirect to these pages by using a PHP code similar to this:
    Code:
    header("Location: http://server.com/schedule.html");
    Anyway, using HTML files as data format can have some drawbacks if you need to manipulate this data also on client side.

    Hope it helps,
    Pit

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Re: Home Screen Mini View

    Quote Originally Posted by jappit View Post
    Hi kiakeroo,

    on client side, you should use the XMLHttpRequest object to connect to the PHP page, download the schedule data, and then use it to create the widget's mini-view.

    On server side, you PHP script should retrieve this data from your MySQL server and then send it to the client by using a suitable data format: usually, JSON or XML.

    If the schedules are mantained into separate HTML files, you could simply redirect to these pages by using a PHP code similar to this:
    Code:
    header("Location: http://server.com/schedule.html");
    Anyway, using HTML files as data format can have some drawbacks if you need to manipulate this data also on client side.

    Hope it helps,
    Pit
    Hey Jappit Thx for replying ,

    i din quite get it as i have no idea about mini view is it possible to have some samplez. would be good enough to understand the thing.


    so far what i get is in my html page use an script in which i use xmlhttprequest var to connect to php using method get or post thn in that php redirect the page to the first html page and send all data to miniview div by elementid is it.


    sorry for the trouble.

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Home Screen Mini View

    Hi kiakeroo,

    if you haven't done it yet, my hint is to start from the Home Screen widgets section of Forum Nokia Library, as it contains useful information and code snippets, as the one to determine whether to display home screen or full screen version of the widget.

    Pit

  5. #5
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Re: Home Screen Mini View

    i have a php page shows all the data and then i get my homescreen miniview from it aswell.... how should i refresh the screenview.. elts say student done his class 11-1 and now next class is at 2 how its going update the current class time.

  6. #6
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Home Screen Mini View

    Quote Originally Posted by kiakeroo View Post
    i have a php page shows all the data and then i get my homescreen miniview from it aswell.... how should i refresh the screenview.. elts say student done his class 11-1 and now next class is at 2 how its going update the current class time.
    As Jappit mentioned this is one of the drawbacks in using HTML to transfer the schedule data. What you could do, is to use JavaScript to search the class start times from the HTML schedule and then hide all other "classes", than those that are ongoing.

    However this can be way more difficult than just to get class start and end times from the XML/JSON formatted schedule data, which does not have presentation markup (HTML) in top of it.

    -Ilkka

  7. #7
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Re: Home Screen Mini View

    how do i get phones default fonts size and color to show it on mini view coz when i run my app on live phone my fonts are diffrent but other all widget fonts are same.

  8. #8
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Home Screen Mini View

    Hi kiakeroo,

    there's no access to this kind of information from a Web Runtime widget. You probably refer to widget realized by using other technologies (e.g.: Symbian C++).

    Pit

  9. #9
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Re: Home Screen Mini View

    thx for all the help.... one more question is it possible to off the landscape mode in the application

  10. #10
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Home Screen Mini View

    Please correct if I misunderstood, but you can use setDisplayPortrait() to force portrait mode.

    Br,
    Ilkka

  11. #11
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Re: Home Screen Mini View

    you r correct ...... i want it to shown only in portrait mode .. and how should i write code about it.

  12. #12
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Re: Home Screen Mini View

    anyone how to turn off the landscae mode inside application but not the phone

  13. #13
    Registered User
    Join Date
    Mar 2003
    Posts
    26

    Re: Home Screen Mini View

    if (widget.isrotationsupported) widget.setDisplayPortrait();

  14. #14
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Re: Home Screen Mini View

    Quote Originally Posted by jmagic View Post
    if (widget.isrotationsupported) widget.setDisplayPortrait();

    i put this code into my first html page, is this aite.

Similar Threads

  1. Question about new home screen widgets
    By wturnage in forum Symbian
    Replies: 8
    Last Post: 2010-01-25, 10:14
  2. Image and Lables in Home Screen.
    By srivatsan.d in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-08-31, 12:33
  3. Quickest way to run script from home screen
    By jtullis in forum Symbian
    Replies: 10
    Last Post: 2009-08-25, 14:06
  4. Home Screen Update rate question
    By mshita in forum Symbian
    Replies: 3
    Last Post: 2009-08-24, 19:46
  5. Web Feeds on Home Screen (Nokia 5800)
    By adrena in forum General Development Questions
    Replies: 2
    Last Post: 2009-02-27, 08:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×