Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
Go Back  Xtreme Visual Basic Talk > > > Setting Text on Webpage's Richtextbox


Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2010, 03:24 PM
smokey2k smokey2k is offline
Newcomer
 
Join Date: Apr 2010
Posts: 2
Default Setting Text on Webpage's Richtextbox


Does anyone know of any methods to set text on a webpage's richtext box? Here is the html code ....

HTML Code:
<script type="text/javascript">
//<![CDATA[


window.name = 'blog';

function openImagePicker(callback,movies)
{
    var movies = (movies == null) ? false : movies;
    var w = 460;
    var h = 470;
    
    window.pickerCallback = callback;

    var url = "/merchant/images/picker?context=blog";
    if (movies) {
        url = url + "&movies=1";
    }
    var winopts = "toolbar=no,location=no,directories=no,status=yes,";
    winopts = winopts + "menubar=no,scrollbars=yes,resizable=yes,";
    winopts = winopts + "width=" + w + ",height=" + h;
    var popupWin = window.open(url,"ImagePicker",winopts);
    popupWin.focus();
    return false;
}

//]]>
</script>


<body id="promoteBusiness" class="yui-skin-sam writeBlogPage">
	

<div id="head">
	<div id="headContent">
		<a href="/corporate/"><img src="/static/imgs/consumer/globe.png" alt="" style="margin-top:10px;float:left;" /></a>
		<div class="bannerAd">
			
	<!-- adman code: header_lb_merchant -->
	<script type="text/javascript">
	GA_googleFillSlot("header_lb_merchant");
	</script>

		</div>
	<script type="text/javascript">
		//<![CDATA[
		schedule("qn", "qnNav()");
		//]]>
	</script>

<div id="wrapper">
	<div id="rightColumn">
		<div id="pageTitle">
			<h1><span id="subTextMainBar"></span> Edit Post</h1>
		</div>

		<div id="content">

		


<form id="blogwritepost" name="blogwritepost" action="/merchant/blog/editSubmit/542139" method="post">
	<input type="hidden" name="company_id" value="30015657" />
<table width="100%"  cellspacing="0" class="tableHorizontal">
	<tr>
        <td>
			<strong>*</strong> <label for="blogTitle">Blog Title:</label><br />

			<input type="text" id="blogTitle" name="blogTitle" tabindex="1" value="Test" />
		    
		</td>
    </tr>
	<tr>
		<td>
			<strong>*</strong> <label for="blogposttext">Blog Body:</label><br />
			
			
			<textarea class="textarea" name="blogposttext" id="blogposttext" tabindex="3">&lt;a title=&quot;Text Here&quot; href=&quot;http://www.urlHERE.com&quot;&gt;Flood Damage&lt;/a&gt;</textarea>

		</td>
    </tr>
	<tr>
        <td>
			<strong>*</strong> <label for="blogKeywords">Keywords:</label><br />
			
			<input type="text" id="blogKeywords" name="blogKeywords" tabindex="3" onblur="this.value=formatkw(this.value);" value="anchorage flooddamagecleanup waterdamagerestoration waterremoval moldremediation sewagedamagecleanup waterdamagecleanup floodedbasementcleanup sewerbackup moldremoval documentdrying‎ frozenpipebreaks" />
		</td>

    </tr>
	<tr>
        <td>
		<label>Suggested Keywords:</label>
			<a class="tag" href="javascript:void(0);" onclick="addkw('anchorage','blogKeywords');">anchorage</a> 
			<a class="tag" href="javascript:void(0);" onclick="addkw('flooddamagecleanup','blogKeywords');">flooddamagecleanup</a> 
			<a class="tag" href="javascript:void(0);" onclick="addkw('waterdamagerestoration','blogKeywords');">waterdamagerestoration</a> 
			<a class="tag" href="javascript:void(0);" onclick="addkw('waterremoval','blogKeywords');">waterremoval</a> 
			<a class="tag" href="javascript:void(0);" onclick="addkw('moldremediation','blogKeywords');">moldremediation</a> 
			<p class="note">We also suggest keywords that come from the blog article just entered.</p>

		</td>
    </tr>
</table>
<div class="bottomPanel">
		<input type="hidden" name="imgSrcHiddenField" id="imgSrcHiddenField" value="" />
		<input type="hidden" name="imgSrcUrlHiddenField" id="imgSrcUrlHiddenField" value="" />
		<input type="hidden" name="start" value="0" />
		<input type="hidden" name="referrer" value="" />
			<input value="Cancel" type="button" id="buttonCancel" class="buttonOrange buttonLeft" tabindex="5" onclick="document.location='http://www.merchantcircle.com/merchant/blog/preview/542139'" />
			<input value="Save" type="submit" id="post_btn" class="buttonOrange" tabindex="5" />

			<input value="Delete" type="button" class="buttonOrange" tabindex="5" onclick="document.location='/merchant/blog/deletePost?posts=542139'" />
</div>
</form>
<h3>Helpful Hints</h3>
<p>Text copied from MS Word causes frequent problems for the blog tool. MerchantCircle suggests that you do <strong>not</strong> cut and paste directly from MS Word into the blog. For best results, copy and paste from Word into a plain text document editor like Notepad then copy/paste from notepad into the blog.</p>

			<div class="mozFix"></div>
		</div>
	</div>

	<div id="left">
		



    <script type="text/javascript">
    function closeOpened(element) {
    	if ( ! hasElementClass(element, 'keepOpen') )
    		swapElementClass(element,'subOpen', 'subItem');
    }

    function toggleMenu(submenu) {
    	if (hasElementClass(submenu, 'subItem')) {
    		map(closeOpened, getElementsByTagAndClassName('ul', 'subOpen'));
    		swapElementClass(submenu, 'subItem', 'subOpen');
    	} else {
    		addElementClass(submenu, 'subItem');
    	}
    }
    </script>
    <script type="text/javascript">
    addLoadEvent(function(){
    	try{
    			if (pageTracker) {
    				pageTracker._setVar("Free")
    			}
    		} catch(e){}
    	});
    </script>


    <div id="leftSubMenu">
    	<div class="quickLinks">
    		<h4><span id="menuHome"><a href="/merchant">Home</a></span></h4>

    	</div>
    	<div class="quickLinks">
    		<h4><span id="menuAdv" onclick="toggleMenu('menuAdsSubMenu')">Advertise on the Internet</span></h4>
    		<ul id="menuAdsSubMenu"     class="subItem">
    			<li><a href="https://www.merchantcircle.com/secure/selectPackage"     >Advertise on Top Search Engines</a></li>
    			<li><a href="https://www.merchantcircle.com/secure/google_only"     >Advertise on Google Only</a></li>
    			<li><a href="https://www.merchantcircle.com/secure/yahoo_only"     >Advertise on Yahoo! Only</a></li>

    			<li><a href="https://www.merchantcircle.com/secure/localads"     >Advertise on Local Websites</a></li>
    			<li><a href="https://www.merchantcircle.com/secure/selectLocalPlus"     >Show my listing in more Cities</a></li>
    			<li><a href="https://www.merchantcircle.com/secure/local_directory"     >Get Listed in Local Directories</a></li>
    			<li><a href="https://www.merchantcircle.com/secure/sponsorConnect"     >Connect with My Town</a></li>
    			<li><a href="https://www.merchantcircle.com/secure/selectBundle/localAdvertisingConsultant"     >Marketing Advisor</a></li>
    			<li><a href="https://www.merchantcircle.com/secure/selectBundle/selectBuyMYYP"     >Listing Bundles</a></li>

    		</ul>
    	</div>
    	<div class="quickLinks">
    		<h4><img src="/static/imgs/icons/menuNew.png" alt="new feature icon" title="Try Sponsored Listings!" class="newFeatureMain" /><span id="menuPromote" onclick="toggleMenu('menuPromoteSubMenu')">Promote My Business</span></h4>
    		<ul id="menuPromoteSubMenu"     class="keepOpen">
			    <li><a style="color:#29a627; font-weight:bold;" href="https://www.merchantcircle.com/secure/sponsored_listing"     >Become Local Sponsor</a></li>
    			<li><a href="https://www.merchantcircle.com/merchant/paid_leads"     >Get Customer Leads</a></li>

    			<li><a href="https://www.merchantcircle.com/merchant/cv/product"     >Create Custom Video</a></li>
			    <li><a href="https://www.merchantcircle.com/secure/richcontent"     >Dynamic Content</a></li>
    			<li><a href="/merchant/promotion/manage?kind=sale"     >Start a Sale</a></li>
    			<li><a href="/merchant/promotion/manage"     >Create a Promotion</a></li>
    			<li><a href="/merchant/coupon"     >Create/Manage Coupons</a></li>
    			<li><a href="/merchant/newsletter/list"     >Create/Manage Newsletters</a></li>

    			<li><a href="https://www.merchantcircle.com/secure/newsletter/purchaseTemplate"     >Purchase Newsletter Templates</a></li>
    			<li><a href="/merchant/campaign"     >Create/Manage Ads</a></li>
    			<li><a href="/merchant/blog/viewArchive"     id="activeSubMenu">Create/Manage Blogs</a></li>
    			<li><a href="https://www.merchantcircle.com/secure/verify"     >MerchantCircle Verified Badge</a></li>
    			<li><a href="/merchant/topMerchantBadge"     >Top Merchant Badge</a></li>
    			<li><a href="/merchant/widgets"     >Downloads &amp; Widgets</a></li>

    			<li><a href="https://www.merchantcircle.com/secure/buildMySite"     >Build my listing for me</a></li>
    		</ul>
    	</div>


Now the typical
web1.Document.getElementById("blogposttext").Value = txtHTMLCode.Text

won't work, infact it will set the value but we need to set the innertext, trying the innertext command will just bring up an error. So far the only way I have been able to pull this off is with send key's and letme tell you its unstable, and buggy using that method and any end user on a vista operating system it wont even work for them. Does ANYONE know how I can set this text field?
Reply With Quote
  #2  
Old 04-22-2010, 10:39 PM
vb5prgrmrSetting Text on Webpage's Richtextbox vb5prgrmr is offline
Senior Contributor

* Expert *
 
Join Date: Mar 2009
Posts: 1,087
Default

Not sure if this will work, but set an object = wb.document.get... and then use the locals window to see its properties (set a break point). Then set object.innertext = text1.text...



Good Luck
__________________
Just because I'm an expert does not mean I know it all and just because I know it all does not mean I'm an expert
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
 
Setting Text on Webpage's Richtextbox
Setting Text on Webpage's Richtextbox
 
-->