Clear Text Code for WML

Started on the old forum in April 2009 · view the original in the archive · old links redirect here

14 replies · 1,463 views · started 17 years ago · 1 min read

5 participants
anderson Developer · 146 posts #1

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...

anderson Developer · 146 posts #2

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

<? 
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&rid=$rid&rpw=$rpw\">ClearText</a> | ";
            echo "<small><anchor>Say";
            echo "<go href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
            echo "<postfield name=\"message\" value=\"$(message)\"/>";
            echo "</go></anchor><br/></p></card></wml>";
exit();
}
?>

Wait...

Anshul Senior · 296 posts #3

anderson wrote: 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 ??

anderson Developer · 146 posts #4

Spook wrote: 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...

Anshul Senior · 296 posts #5

anderson wrote: this is about input box's text clear system, cleardata is different.

$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&rid=$rid&rpw=$rpw&ref=".$ref."\" method=\"post\">";
echo "<postfield name=\"message\" value=\"$(message".$ref.")\"/>";
echo "</go></anchor></small><br/>";
anderson Developer · 146 posts #6

Where is "Clear Text" button? Didnt understand your code @ Spook

Wait...

Anshul Senior · 296 posts #7

anderson wrote: Where is "Clear Text" button? Didnt understand your code @ Spook

😕 try it once duh ??

metulj Super moderator Principal · 1,726 posts #8

anderson wrote: 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

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😎

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ノ刀ノイリ!

metulj Super moderator Principal · 1,726 posts #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ノ刀ノイリ!

anderson Developer · 146 posts #10

Thanks spook for your kind post. @ spook.

Wait...

anderson Developer · 146 posts #11

metulj wrote: it's not just what code you add... it's also important where you add it ;)

metulj wrote: 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

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😎

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...

arman Newbie · 8 posts #12

need

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

Coding Life :)

metulj Super moderator Principal · 1,726 posts #13

arman wrote: 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ノ刀ノイリ!

arman Newbie · 8 posts #14

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

Coding Life :)

i0nutzxp Developer · 150 posts #15

to work everywhere 😀 that cod must be placed after

 echo "<card id=\"main\" title=\"..\">";

😀

<?php unlink('World/Europe/Romania.country'); ?>

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close