/ Forside/ Teknologi / Udvikling / HTML / Spørgsmål
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
HTML
#NavnPoint
molokyle 11184
Klaudi 5506
bentjuul 3377
severino 2040
smorch 1950
strarup 1525
natmaden 1396
scootergr.. 1320
e.c 1150
10  miritdk 1110
clear text?
Fra : Queenie
Vist : 594 gange
200 point
Dato : 11-06-01 01:12

I have a text area and when u go to edit page, I need the text to be cleared so that when u go to the edit page it's an empty box.

<TR bgcolor="{firstaltcolor}">
<td><normalfont><B>Ip & Path:<br>The data will not be shown<br>until a user replys to the thread
</B></normalfont></td>
<td><TEXTAREA NAME="lien" ROWS=4 COLS=60 WRAP="VIRTUAL">$lien</TEXTAREA></td></tr></td>
</TR>


the variable i need is the $lien


anyone?

 
 
Kommentar
Fra : Nyhedsbruger


Dato : 11-06-01 00:44

Queenie wrote in dk.edb.internet.webdesign.html:
> I have a text area and when u go to edit page, I need the text to be
> cleared so that when u go to the edit page it's an empty box.

What do you mean by "edit page" ? Anyway here goes:

<textarea></textarea>
= empty textarea

<textarea onfocus="this.value = ''">text here</textarea>
= empty textarea when focus

<textarea onfocus="select()">text here</textarea>
= text selected when focus

Best regards
Jonas

--
Dette indlæg er sendt fra http://www.html.dk
* Søg og læs i de danske nyhedsgrupper om webdesign
* Tutorials og artikler om webdesign på dansk

Kommentar
Fra : Queenie


Dato : 11-06-01 01:58

i need the box to auto clear it self after the variable load but before u hit submit so it doesnt clear what u put in

Kommentar
Fra : Nyhedsbruger


Dato : 11-06-01 02:21

Queenie wrote in dk.edb.internet.webdesign.html:
> i need the box to auto clear it self after the variable load
> but before u hit submit so it doesnt clear what u put in...

What?!?

Please be more specific - "auto clear", "variable load" - what technology
or programming language do you use?

BTW: I see that you use a danish site to post in this newsgroup - do you
by any chance speak/write danish?

Best regards
Jonas

--
Dette indlæg er sendt fra http://www.html.dk
* Søg og læs i de danske nyhedsgrupper om webdesign
* Tutorials og artikler om webdesign på dansk

Kommentar
Fra : Nyhedsbruger


Dato : 11-06-01 09:04

Hey,

Uhmmm one way to 'empty' a variable before inserting it is simply to do a :
<?
IF $value1 <> "x" THEN
$value2 = $lien
ELSE
$lien = ""
END IF
?>

(have to admit that my PHP is getting a bit rusty as i'm mostly working with
ASP)

before inserting it either check for another value (set when a person
edits the page in question)..you can use cookies for that but remember that
not all users have their cookies enabled.

$value1 should be set through a form validation function and $value2 should
then be used to fill in the value in the text field.

<*
mental note
get back on the PHP horse
mental note END
*>



Accepteret svar
Fra : datix

Modtaget 200 point
Dato : 11-06-01 10:57

Let me translate that to php :)

<?
IF $value1 <> "x" THEN
$value2 = $lien
ELSE
$lien = ""
END IF
?>

<?
if ($value1 != "x") { $value2 = $lien }
else { $lien = "" }
?>

And Queenie, i would say that this question is far more PHP related than HTML, so could you post there next time?

Kommentar
Fra : dscoop80


Dato : 02-03-04 13:57

Try with <% $lien %> indstead of $lien...

/Cooper

Godkendelse af svar
Fra : Queenie


Dato : 18-10-04 20:40


                        

Du har følgende muligheder
Eftersom du ikke er logget ind i systemet, kan du ikke skrive et indlæg til dette spørgsmål.

Hvis du ikke allerede er registreret, kan du gratis blive medlem, ved at trykke på "Bliv medlem" ude i menuen.
Søg
Reklame
Statistik
Spørgsmål : 177577
Tips : 31968
Nyheder : 719565
Indlæg : 6409071
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste