Submit a <div>

Results 1 to 3 of 3

Thread: Submit a <div>

  1. #1
    jeps0 Guest

    Default Submit a <div>

    I read an interesting article at MSDN ( which seems to solve my problem with the clumsiness of &#060;textarea&#062; (want to hide HTML code). My problem is that the input text is written in a &#060;div&#062; with the name "foo" (as always with MS). Is it possible to post the content in this &#060;div&#062; by putting it inside a &#060;form method="POST"&#062;?<BR><BR>MS says this:<BR>"Persisting Editable Content<BR>It&#039;s up to you to decide how you want to persist editable content. If you&#039;re using Active Server Pages (ASP), you can include your editable elements in a form, use the Post method to post them to an ASP page, and then store them on your server however you like. ASP pages are documented in the ASP SDK, so we won&#039;t elaborate on them further here. Another, and perhaps more interesting, way is to persist the data on the client using the UserData behavior."<BR><BR>What do they mean and how do I do it?<BR><BR>/ jeps0

  2. #2
    Al Bear Guest

    Default not sure if I have th right end of teh stick...

    If you want to remove HTML from ther text area. try HTML striping. <BR><BR>here a html striping function..<BR><BR>&#060;%<BR>Function stripHTML(strHTML)<BR>&#039;Strips the HTML tags from strHTML<BR><BR> Dim objRegExp, strOutput<BR> Set objRegExp = New Regexp<BR><BR> objRegExp.IgnoreCase = True<BR> objRegExp.Global = True<BR> objRegExp.Pattern = "&#060;.+?&#062;"<BR><BR> &#039;Replace all HTML tag matches with the empty string<BR> strOutput = objRegExp.Replace(strHTML, "")<BR> <BR> &#039;Replace all &#060; and &#062; with &lt; and &gt;<BR> strOutput = Replace(strOutput, "&#060;", "&lt;")<BR> strOutput = Replace(strOutput, "&#062;", "&gt;")<BR> <BR> stripHTML = strOutput &#039;Return the value of strOutput<BR><BR> Set objRegExp = Nothing<BR>End Function<BR>%&#062;<BR>

  3. #3
    jeps0 Guest

    Default No, that's not it

    Check to see what I mean (requires IE5.5 I think). Just write a word, mark it and press "Bold". Instead of an ordinary &#060;textarea&#062; you can add text and render it like in Frontpage. Try writing a URL and see how it&#039;s automatically converted.<BR><BR>I want to post the content of that &#060;div&#062; in order to store it in a database, but I have no idea of how to do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts