×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    6

    How to display the content on same page?

    hello,
    I want to display the content on same web page dynamicly. but I can't find the way. the model likes:
    _______________
    | |
    | display area |
    |______________|
    Submit

    Every time when I click the button [Submit], the content will reflesh. but all these will only take place on client. Not running on the server. we know it is easy on PC just like:
    ................................................................
    function Compute()
    {
    var string;

    string="<table><tr><td>"+Math.random()+"</td></tr></table>";

    document.getElementById("display").innerHTML=string;
    }
    ............................................................
    <form name="form1" action="" method="post" >
    <div id="display" > you; </div>
    <input type="button" name="Submit" value="submt" onClick="Compute()">
    </form>
    ..........................................................

    But the model will not work on mobile phone or PDA. how to get it? thanks a lot

  2. #2
    Registered User
    Join Date
    Feb 2006
    Location
    Brazil
    Posts
    523

    Re: How to display the content on same page?

    Quote Originally Posted by youzx View Post
    hello,
    I want to display the content on same web page dynamicly. but I can't find the way. the model likes:
    _______________
    | |
    | display area |
    |______________|
    Submit

    Every time when I click the button [Submit], the content will reflesh. but all these will only take place on client. Not running on the server. we know it is easy on PC just like:
    ................................................................
    function Compute()
    {
    var string;

    string="<table><tr><td>"+Math.random()+"</td></tr></table>";

    document.getElementById("display").innerHTML=string;
    }
    ............................................................
    <form name="form1" action="" method="post" >
    <div id="display" > you; </div>
    <input type="button" name="Submit" value="submt" onClick="Compute()">
    </form>
    ..........................................................

    But the model will not work on mobile phone or PDA. how to get it? thanks a lot
    you forgot to place your script inside <script> tag.The correct code is:


    Code:
    <script>
    function Compute()
      {
       var string;
       
       string="<table><tr><td>"+Math.random()+"</td></tr></table>";
       
       document.getElementById("display").innerHTML=string;
      }
    </script>
    
    <form name="form1"  action="" method="post" >
    <div id="display" > you; </div>   
      <input type="button" name="Submit" value="submt" onClick="Compute()">   
    </form>
    I've just tested it and it actually works here using Opera browser for S60.The page generates a random number each time "Submit" is pressed.
    But of course, it'll depend on the phone whether it'll work.Even if phone browser has javascript support, it might not work.

    All S60 phones that have javascript support in the "Services" browser don't support most scripts

    best regards
    Http_user_agent:
    NokiaN80-1/3.0 (4.0707.0.7)
    Series60/3.0
    Profile/MIDP-2.0
    Configuration/CLDC-1.1

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    6

    Re: How to display the content on same page?

    Thanks a lot.
    Later I will test it on higher version browser. But would you like to tell which browsers on mobile phone have supported the ecmascript?

  4. #4
    Registered User
    Join Date
    Feb 2006
    Location
    Brazil
    Posts
    523

    Re: How to display the content on same page?

    Quote Originally Posted by youzx View Post
    ...But would you like to tell which browsers on mobile phone have supported the ecmascript?
    -All the built-in browsers of S60 2nd edition Feature Pack 2 phones onwards: phones like 6680, 6681, N70, N90, N80, N73, N95, 3250.i don't know about S60 2nd edition Feature Pack 1

    -Opera and NetFront for S60 (NetFront isn't available for S60 3rd edition)

    Another one is Opera Mini (java application).But it can't execute local javascripts like the one you've posted before


    best regards
    Http_user_agent:
    NokiaN80-1/3.0 (4.0707.0.7)
    Series60/3.0
    Profile/MIDP-2.0
    Configuration/CLDC-1.1

  5. #5
    Registered User
    Join Date
    Aug 2007
    Posts
    6

    Re: How to display the content on same page?

    Ok, I see. thanks a lot.
    I want to test the related code. do you know where I can download the simulator whose browser supports the ecmascript?

  6. #6
    Registered User
    Join Date
    Feb 2006
    Location
    Brazil
    Posts
    523

    Re: How to display the content on same page?

    what's the target phone you want to test the code?


    best regards
    Http_user_agent:
    NokiaN80-1/3.0 (4.0707.0.7)
    Series60/3.0
    Profile/MIDP-2.0
    Configuration/CLDC-1.1

Similar Threads

  1. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  2. Unsopported Content Page
    By auwuisien in forum General Development Questions
    Replies: 2
    Last Post: 2006-09-24, 07:11
  3. unsupport content page
    By auwuisien in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2006-09-20, 10:02
  4. Audio Input Stream on N80
    By tkaihock in forum Symbian Media (Closed)
    Replies: 9
    Last Post: 2006-06-30, 09:15
  5. Problem with Display Chinese in WML Page
    By henry_wong2k in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2003-02-24, 02:12

Posting Permissions

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