Clear Text Code for WML

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

    Clear Text Code for WML

    Hello all take my good wishes. I want to make the text clear function in chat and PM input box for lavalair. By pressing "Clear Text" button users can clear their old texts instantly before writing new. I am just searching for this code. If anyone is expert on it please share with us here.
    Wait...
    sigpic

    #2
    I tried to use the following code but result is 0!!!
    I would be grateful if anyone could find out the problem. Thanks.

    Code:
    <? 
    header("Content-type: text/vnd.wap.wml");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    echo "<wml>";
    echo "<head>";
    echo "<meta forua=\"true\" http-equiv=\"Cache-Control\" content=\"max-age=0\"/>";
    echo "</head>";
    $action=$_GET["action"];
    $id=$_GET["id"];
    $sid = $_GET["sid"];
    $rid=$_GET["rid"];
    $rpw=$_GET["rpw"];
    $needto = $_GET["needto"];
    if($needto=="clear")
    {
              echo "<onevent type=\"onenterforward\">";
       echo "<refresh><setvar name=\"message\" value=\"\"/>";
       echo "</refresh></onevent>";
    }
    if ($action=="main")
    {    
         echo "<card id=\"main\" title=\"HelloWorld\">";
        echo "<p align=\"left\"><input name=\"message\" type=\"text\" size=\"20\" value=\"\" maxlength=\"125\"/><br/>";
                echo "<a href=\"chat.php?needto=clearamp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">ClearText</a> | ";
                echo "<small><anchor>Say";
                echo "<go href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\" method=\"post\">";
                echo "<postfield name=\"message\" value=\"$(message)\"/>";
                echo "</go></anchor><br/></p></card></wml>";
    exit();
    }
    ?>
    Wait...
    sigpic

    Comment


      #3
      Originally posted by anderson View Post
      Hello all take my good wishes. I want to make the text clear function in chat and PM input box for lavalair. By pressing "Clear Text" button users can clear their old texts instantly before writing new. I am just searching for this code. If anyone is expert on it please share with us here.
      there is already a cleardata function in lava that delete old chat texts ??

      Comment


        #4
        Originally posted by Spook View Post
        there is already a cleardata function in lava that delete old chat texts ??
        this is about input box's text clear system, cleardata is different.
        Wait...
        sigpic

        Comment


          #5
          Originally posted by anderson View Post
          this is about input box's text clear system, cleardata is different.
          PHP Code:
          $ref rand(0,100000);
          echo 
          "<p>Message:<input name=\"message".$ref."\" type=\"text\" value=\"\" maxlength=\"255\"/><br/>";
          echo 
          "<small><anchor>«Say";
          echo 
          "<go href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw&amp;ref=".$ref."\" method=\"post\">";
          echo 
          "<postfield name=\"message\" value=\"$(message".$ref.")\"/>";
          echo 
          "</go></anchor></small><br/>"

          Comment


            #6
            Where is "Clear Text" button? Didnt understand your code @ Spook
            Wait...
            sigpic

            Comment


              #7
              Originally posted by anderson View Post
              Where is "Clear Text" button? Didnt understand your code @ Spook
              :confused:
              try it once duh ??

              Comment


                #8
                Originally posted by anderson View Post
                Hello all take my good wishes. I want to make the text clear function in chat and PM input box for lavalair. By pressing "Clear Text" button users can clear their old texts instantly before writing new. I am just searching for this code. If anyone is expert on it please share with us here.

                im not sure if i understand this correct... so let me ask you..
                you wont that text input field to be clear, where users write their msgs for chat?

                you actually dont need any ''Clear Text'' button...

                add this in chat.php

                PHP Code:
                else if ($action=="say")
                        {
                        echo 
                "<card id=\"say\" title=\"$chroom\">";
                          print 
                '<onevent type="onenterforward">';
                          print 
                '<refresh>';
                          print 
                '<setvar name="message" value=""/>';
                          print 
                '</refresh>';
                          print 
                '</onevent>';
                .......................................
                ...................................... 
                and same for action=="say2"

                and yout text input field will be always auto cleared:cool:
                It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
                ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
                ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
                キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

                Comment


                  #9
                  it's not just what code you add... it's also important where you add it ;)
                  It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
                  ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
                  ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
                  キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

                  Comment


                    #10
                    Thanks spook for your kind post. @ spook.
                    Wait...
                    sigpic

                    Comment


                      #11
                      Originally posted by metulj View Post
                      it's not just what code you add... it's also important where you add it ;)
                      Originally posted by metulj View Post
                      im not sure if i understand this correct... so let me ask you..
                      you wont that text input field to be clear, where users write their msgs for chat?

                      you actually dont need any ''Clear Text'' button...

                      add this in chat.php

                      PHP Code:
                      else if ($action=="say")
                              {
                              echo 
                      "<card id=\"say\" title=\"$chroom\">";
                                print 
                      '<onevent type="onenterforward">';
                                print 
                      '<refresh>';
                                print 
                      '<setvar name="message" value=""/>';
                                print 
                      '</refresh>';
                                print 
                      '</onevent>';
                      .......................................
                      ...................................... 
                      and same for action=="say2"

                      and yout text input field will be always auto cleared:cool:
                      Special thanks to you. Please tell me another information, is this code workable for PM input field? And I am not able to send PM anyone here in coding talk. Plz tell me how can I enable it. @ metulj
                      Wait...
                      sigpic

                      Comment


                        #12
                        need

                        ya,bro.i also need clear text code for inbox,plz help

                        Comment


                          #13
                          Originally posted by arman View Post
                          ya,bro.i also need clear text code for inbox,plz help
                          you got example above...
                          so why dont you try to use it
                          before you post what you need ?
                          It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
                          ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
                          ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
                          キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

                          Comment


                            #14
                            example given for chatroom,i want to know is the same code for inbox?

                            Comment


                              #15
                              to work everywhere :D that cod must be placed after
                              PHP Code:
                               echo "<card id=\"main\" title=\"..\">"
                              :D
                              <?php unlink('World/Europe/Romania.country'); ?>

                              Comment

                              Working...
                              X