WebBrowser Ecriture Texte Dans Une TextArea

Résolu
johann74270 Messages postés 12 Date d'inscription dimanche 2 novembre 2008 Statut Membre Dernière intervention 2 juin 2013 - 27 oct. 2011 à 14:36
 Utilisateur anonyme - 29 oct. 2011 à 00:42
Bonjour A Tous,

Voila Je Souhaite Crée Plusieurs Sujets De Discussion Dans Mon Forum (MyBB)
Mais Voila Cependant Je N'Arrive Pas A Ecrire Un Texte Depuis Mon Application Que Je Suis En Train De Crée :

Je Voudrais Pouvoir Ecrire Sur La Zone De Text Qui Est Similaire Là Je Suis En Train D'Ecrire Pour Poser Ma Question.

Merci De Votre Aide.

Voici Le Code Html :

<!-- end: smilieinsert --></td>
<td class="trow2">
<textarea name="message" id="message" rows="20" cols="70" tabindex="2"></textarea>
<!-- start: codebuttons -->
<script type="text/javascript" src="jscripts/editor.js?ver=1600"></script>
<script type="text/javascript">
<!--
var editor_language = {
title_bold: "Insert bold text",
title_italic: "Insert italic text",
title_underline: "Insert underlined text",
title_left: "Align text to the left",
title_center: "Align text to the center",
title_right: "Align text to the right",
title_justify: "Justify text",
title_numlist: "Insert numbered list",
title_bulletlist: "Insert bulleted list",
title_image: "Insert image",
title_hyperlink: "Insert hyperlink",
title_email: "Insert email address",
title_quote: "Insert quoted text",
title_code: "Insert formatted code",
title_php: "Insert formatted PHP code",
title_close_tags: "Close any open MyCode tags that you currently have open",
enter_list_item: "Enter a list item. Click cancel or leave blank to end the list.",
enter_url: "Please enter the URL of the website.",
enter_url_title: "Optionally, you can also enter a title for the URL.",
enter_email: "Please enter the email address you wish to insert.",
enter_email_title: "Optionally, you may also enter a title for the email address.",
enter_image: "Please enter the remote URL of the image you wish to insert.",
enter_video_url: "Please enter the URL of the video.",
video_dailymotion: "Dailymotion",
video_googlevideo: "Google Video",
video_metacafe: "MetaCafe",
video_myspacetv: "MySpace TV",
video_vimeo: "Vimeo",
video_yahoo: "Yahoo Video",
video_youtube: "YouTube",
size_xx_small: "XX Small",
size_x_small: "X Small",
size_small: "Small",
size_medium: "Medium",
size_large: "Large",
size_x_large: "X Large",
size_xx_large: "XX Large",
font: "Font",
size: "Text Size",
color: "Text Color"
};
var clickableEditor = new messageEditor("message", {lang: editor_language, rtl: 0, theme: "Office_2007"});
if(clickableEditor)
{
clickableEditor.bindSmilieInserter("clickable_smilies");
}
// -->
</script>
<!-- end: codebuttons -->

2 réponses

Utilisateur anonyme
29 oct. 2011 à 00:42
Bonsoir,

Tous (all) les éléments de la page doivent être pris en compte pour former une collection d'élements portant le nom "message".
Ensuite, le premier item de la collection obtenue doit être sélectionné (0) pour y placer le texte par sa propriété OuterText.

webbrowser1.document.all.GetElementsByName("message").Item(0).OuterText = TextAMettre


Bonne soirée.
3
johann74270 Messages postés 12 Date d'inscription dimanche 2 novembre 2008 Statut Membre Dernière intervention 2 juin 2013
28 oct. 2011 à 17:31
J'Arrive A Lire Le Contenu De La Zone De Texte, Mais Je Ne Peut Pas Ecrire A L'Aide De Ce Code :
Dim TextAMettre As String = "Johann A Réussit"
        WebBrowser1.Document.GetElementsByTagName("textarea").GetElementsByName("message").Item(0).OuterText = TextAMettre
0
Rejoignez-nous