Forms in text ?

Last post 02-20-2006, 1:45 PM by Adam. 4 replies.
Sort Posts: Previous Next
  •  02-03-2005, 3:10 AM 3896

    Forms in text ?

    I have been playing around with the form elements of the editor, but I can't get it to work properly.
     
    I have tried to to catch the values of the form by:
     
    Dim formElement As New System.Web.UI.WebControls.Label
    If Request.Form.HasKeys Then
     For Each element As String In Request.Form
     formElement.Text += (element & ": " & Request.Form(element) & "<br>")
     Next
    Else
     formElement.Text = "<!-- Nothing posted -->"
    End If
    PlaceHolder1.Controls.Add(formElement)
    It seems that the form collection only has one key "__viewstate"
     
    I really need som kind of documentation to get going on this one.
     
    Hopefully you can help me.
     
    regards
    Lars Kohsel
     
     
     
    The entire code of the page is :
    ============================================================================================
     
     
     

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
     <HEAD>
      <META http-equiv="Content-Type" content="text/html; charset=windows-1252">
     <!--
     ============= dynaSITE.smb  =============
     ' copyright 2004
     ' Kohsel Data - Internetløsninger til ethvert behov
     ' Skottenborg 12-14
     ' 8800 Viborg
     ' Tlf. 8688 8848
     ' http://www.dynasite-smb.dk
     ============= dynaSITE.smb  =============
     -->
     <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
     <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
     <meta content="JavaScript" name="vs_defaultClientScript">
     <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
     <script>
       function popImg(strImg){
        strArg  = 'width=100,height=100,scrollbars=no,top=50,left=100';
        window.open('popWin.aspx?img='+strImg, 'Title',strArg);
       }
     </script>
     
    <title>
     billeder fra DB - dynaSITE.smb - Få en billig hjemmeside du selv kan opdatere
    </title>
    <meta http-equiv="Page-Exit" content="progid:DXImageTransform.Microsoft.gradientWipe(duration=1)">
    <meta content="dynaSITE.smb er et system, der gør det muligt at skabe og vedligeholde din egen hjemmeside uden forkundskaber.
    Vi ved hvor skoen trykker når ”almindelige mennesker” skal lave hjemmesider. Derfor har vi gjort os umage med at lave et system, der hjælper dig til at udforme en hjemmeside, som på alle måder kan måle sig med meget dyrerer løsninger. Med dynaSITE.smb kommer din virksomhed let på Internettet til en meget konkurrencedygtig pris.
    " name=keywords>
    <meta content="dynaSITE.smb er et system, der gør det muligt at skabe og vedligeholde din egen hjemmeside uden forkundskaber.
    Vi ved hvor skoen trykker når ”almindelige mennesker” skal lave hjemmesider. Derfor har vi gjort os umage med at lave et system, der hjælper dig til at udforme en hjemmeside, som på alle måder kan måle sig med meget dyrerer løsninger. Med dynaSITE.smb kommer din virksomhed let på Internettet til en meget konkurrencedygtig pris.
    " name=description>
    <LINK
    href='layout/styles.css' type=text/css
    rel=stylesheet>
    <style type="text/css">#header
    {
     background-color: white;
     position: relative;
     top: 0px;
     left: 0px;
     width: 750px;
     height:100px;
     background-image: url(http://imageserver.dynasite.dk/?design=1&ID=170);
    }
     
    body, td, P {
    font-size: 11px;
    }
    UL, LI, OL {
        list-style: square;
    }
     
    BODY {
    background: #F5F5F5;
    background-image: url('http://imageserver.dynasite.dk/default.aspx?design=1&ID=169');
    background-repeat:  repeat-x;
    background-position: left top;
    }
     
    body#edit {
    background: white;
    }
     
    H1 {
    background-image: url('http://imageserver.dynasite.dk/default.aspx?design=1&ID=167');
    background-repeat:  no-repeat;
    background-position: 0 20;
    color: #C3C3C3;
    padding: 0 0 0 60px;
    font-size: 35px;
    FONT-FAMILY: Tahoma, Verdana, Arial, Helvetica;
    Font-weight: normal;
    line-height: 150%;
    }
     
    div.utils {
    position: absolute;
    top: 175px;
    left: -90px;
    width: 75px;
    height: auto;
    color: #cccccc;
    font-size: 9px;
    text-align: right;
    }
     
    .secondline { background-color: #F5F5F5; }
     
    fieldset legend {color: gray; font-size: 12px; }
    </style>
    <body>
     <form name="_ctl0:Form1" method="post" action="default.aspx?ID=161" id="_ctl0_Form1">
    <input type="hidden" name="__VIEWSTATE" value="dDwtNzgxODAxMTI1Ozs+TwNZsPeROR986Wu8RxzgZIbk5I0=" />
     
    <script language='javascript'>
    <!--
    //Region Global Variables
    var skm_SelectedMenuStyleInfos=new Object();
    var skm_UnselectedMenuStyleInfos=new Object();
    var skm_MenuFadeDelays=new Object();
    var skm_clockValue=0;
    var skm_ticker;
    var skm_highlightTopMenus=new Object();
    var skm_images=new Array();
    var skm_OpenMenuItems = new Array();
    //EndRegion
    //Region Methods to hook up a menu to the global variables
    function skm_registerMenu(menuID, selectedStyleInfo, unselectedStyleInfo, menuFadeDelay, highlightTopMenu){
     skm_SelectedMenuStyleInfos[menuID]=selectedStyleInfo;
     skm_UnselectedMenuStyleInfos[menuID]=unselectedStyleInfo;
     skm_MenuFadeDelays[menuID]=menuFadeDelay;
     skm_highlightTopMenus[menuID]=highlightTopMenu;
    }
    //Region The methods and contructor of the skm_styleInfo object.
    function skm_applyStyleInfoToElement(element){
     element.style.backgroundColor=this.backgroundColor;
     element.style.borderColor=this.borderColor;
     element.style.borderStyle=this.borderStyle;
     element.style.borderWidth=this.borderWidth;
     element.style.color=this.color;
     if (this.fontFamily!='')
      element.style.fontFamily=this.fontFamily;
     element.style.fontSize=this.fontSize;
     element.style.fontStyle=this.fontStyle;
     element.style.fontWeight=this.fontWeight;
     if (this.className!='')
      element.style.className=this.className;
    }
    function skm_styleInfo(backgroundColor,borderColor,borderStyle,borderWidth,color,fontFamily,fontSize,fontStyle,fontWeight,className){
     this.backgroundColor=backgroundColor;
     this.borderColor=borderColor;
     this.borderStyle=borderStyle;
     this.borderWidth=borderWidth;
     this.color=color;
     this.fontFamily=fontFamily;
     this.fontSize=fontSize;
     this.fontStyle=fontStyle;
     this.fontWeight=fontWeight;
     this.className=className;
     this.applyToElement=skm_applyStyleInfoToElement;
    }
    //Region MouseEventHandlers
    function skm_mousedOverMenu(menuID,elem,parent,displayedVertically,imageSource){
     skm_stopTick();
     skm_closeSubMenus(elem);
     var childID=elem.id+"-subMenu";  // Display child menu if needed
     if (document.getElementById(childID)!=null){  // make the child menu visible and specify that its position is specified in absolute coordinates
      document.getElementById(childID).style.display='block';
      document.getElementById(childID).style.position='absolute';
      skm_OpenMenuItems = skm_OpenMenuItems.concat(childID);
      if (displayedVertically){ // Set the child menu's left and top attributes according to the menu's offsets
       document.getElementById(childID).style.left=skm_getAscendingLefts(parent)+parent.offsetWidth;
       document.getElementById(childID).style.top=skm_getAscendingTops(elem);
       var visibleWidth=parseInt(window.outerWidth?window.outerWidth-9:document.body.clientWidth,10);
       if ((parseInt(document.getElementById(childID).offsetLeft,10)+parseInt(document.getElementById(childID).offsetWidth,10))>visibleWidth) {
        document.getElementById(childID).style.left=visibleWidth-parseInt(document.getElementById(childID).offsetWidth,10);
       }
      }else{  // Set the child menu's left and top attributes according to the menu's offsets
       document.getElementById(childID).style.left=skm_getAscendingLefts(elem);
       document.getElementById(childID).style.top=skm_getAscendingTops(parent)+parent.offsetHeight;
       if (document.getElementById(childID).offsetWidth<elem.offsetWidth)
        document.getElementById(childID).style.width=elem.offsetWidth;
      }
     }
     if (skm_SelectedMenuStyleInfos[menuID] != null) skm_SelectedMenuStyleInfos[menuID].applyToElement(elem);
     if (skm_highlightTopMenus[menuID]){
      var eId=elem.id+'';
      while (eId.indexOf('-subMenu')>=0){
       eId=eId.substring(0, eId.lastIndexOf('-subMenu'));
       skm_SelectedMenuStyleInfos[menuID].applyToElement(document.getElementById(eId));
      }
     } 
     if (imageSource!=''){
      setimage(elem,imageSource)
     }
    }
    function skm_mousedOverClickToOpen(menuID,elem,parent,imageSource){
     skm_stopTick();
     if (skm_SelectedMenuStyleInfos[menuID] != null) skm_SelectedMenuStyleInfos[menuID].applyToElement(elem);
     if (skm_highlightTopMenus[menuID]){
      var eId=elem.id+'';
      while (eId.indexOf('-subMenu')>=0){
       eId=eId.substring(0, eId.lastIndexOf('-subMenu'));
       skm_SelectedMenuStyleInfos[menuID].applyToElement(document.getElementById(eId));
      }
     } 
     if (imageSource!=''){
      setimage(elem,imageSource)
     }
    }
    function skm_mousedOverSpacer(menuID,elem,parent){
     skm_stopTick();
    }
    function skm_mousedOutMenu(menuID,elem,imageSource){
     skm_doTick(menuID);
     if (skm_UnselectedMenuStyleInfos[menuID] != null) skm_UnselectedMenuStyleInfos[menuID].applyToElement(elem);
     if (skm_highlightTopMenus[menuID]){
      var eId=elem.id+'';
      while (eId.indexOf('-subMenu')>=0){
       eId=eId.substring(0, eId.lastIndexOf('-subMenu'));
       skm_UnselectedMenuStyleInfos[menuID].applyToElement(document.getElementById(eId));
      }
     }
     if (imageSource!=''){
      setimage(elem,imageSource)
     }
    }
    function skm_mousedOutSpacer(menuID, elem){
     skm_doTick(menuID);
    }
    //Region Utility Functions
    function skm_closeSubMenus(parent){
     if (skm_OpenMenuItems == "undefined") return;
     for (var i=skm_OpenMenuItems.length-1; i>-1;i--) {
      if (parent.id.indexOf(skm_OpenMenuItems[i]) != 0) {
       document.getElementById(skm_OpenMenuItems[i]).style.display = 'none';
       skm_shimSetVisibility(false, skm_OpenMenuItems[i]);   
       skm_OpenMenuItems = new Array().concat(skm_OpenMenuItems.slice(0,i), skm_OpenMenuItems.slice(i+1));
        }
     }
    }
    function skm_shimSetVisibility(makevisible, tableid){
     var tblRef=document.getElementById(tableid);
     var IfrRef=document.getElementById('shim'+tableid);
     if (tblRef!=null && IfrRef!=null){
      if(makevisible){
       IfrRef.style.width=tblRef.offsetWidth;
       IfrRef.style.height=tblRef.offsetHeight;
       IfrRef.style.top=tblRef.style.top;
       IfrRef.style.left=tblRef.style.left;
       IfrRef.style.zIndex=tblRef.style.zIndex-1;
       IfrRef.style.display="block";
      }else{
       IfrRef.style.display="none";
      }
     }
    }
    function skm_IsSubMenu(id){
     if (skm_subMenuIDs == "undefined") return false;
     for (var i=0;i<skm_subMenuIDs.length;i++)
       if (id==skm_subMenuIDs[i]) return true;
     return false;
    }
    function skm_getAscendingLefts(elem){
     if (elem==null)
      return 0;
     else
     {
      if ((elem.style.position=='absolute' || elem.style.position=='relative') && !skm_IsSubMenu(elem.id)) return 0;
      return elem.offsetLeft+skm_getAscendingLefts(elem.offsetParent);
     }
    }
    function skm_getAscendingTops(elem){
     if (elem==null)
      return 0;
     else {
      if ((elem.style.position=='absolute' || elem.style.position=='relative') && !skm_IsSubMenu(elem.id)) return 0;
      return elem.offsetTop+skm_getAscendingTops(elem.offsetParent);
     }
    }
    //Region Fade Functions
    function skm_doTick(menuID){
     if (skm_clockValue>=skm_MenuFadeDelays[menuID]){
      skm_stopTick();
      skm_closeSubMenus(document.getElementById(menuID));
     } else {
      skm_clockValue++;
      skm_ticker=setTimeout("skm_doTick('"+menuID+"');", 500);
     }
    }
    function skm_stopTick(){
     skm_clockValue=0;
     clearTimeout(skm_ticker);
    }
    function preloadimages(){
     for (i=0;i<preloadimages.arguments.length;i++){
      skm_images[i]=new Image();
      skm_images[i].src=preloadimages.arguments[i];
     }
    }
    function setimage(elem,imageSource){
     var i=elem.getElementsByTagName("img")[0];
     i.src=imageSource;
    }
    //-->
    </script>
      <table height="100%" width="100%">
       <tr>
        <td class="tdpseudo">
         <div id="side">
          <div id="header"></div>
          <div id="menu"><table cellspacing="2" cellpadding="2" id="_ctl0_Menu1" border="0" style="z-index:1000;">
     <tr>
      <td class="menuclass" id="_ctl0_Menu1-menuItem000" onclick=skm_closeSubMenus(document.getElementById('_ctl0_Menu1'));location.href='default.aspx?ID=163';" onmouseover=skm_mousedOverMenu('_ctl0_Menu1',this, document.getElementById('_ctl0_Menu1'), true, '');skm_shimSetVisibility(true,'_ctl0_Menu1-menuItem000-subMenu');this.className='mouseOverMenu';" onmouseout=skm_mousedOutMenu('_ctl0_Menu1', this, '');this.className='menuclass';">Forside</td>
     </tr><tr>
      <td class="menuclass" id="_ctl0_Menu1-menuItem001" onclick=skm_closeSubMenus(document.getElementById('_ctl0_Menu1'));location.href='default.aspx?ID=76';" onmouseover=skm_mousedOverMenu('_ctl0_Menu1',this, document.getElementById('_ctl0_Menu1'), true, '');skm_shimSetVisibility(true,'_ctl0_Menu1-menuItem001-subMenu');this.className='mouseOverMenu';" onmouseout=skm_mousedOutMenu('_ctl0_Menu1', this, '');this.className='menuclass';">Nem opdatering</td>
     </tr><tr>
      <td class="menuclass" id="_ctl0_Menu1-menuItem002" onclick=skm_closeSubMenus(document.getElementById('_ctl0_Menu1'));location.href='default.aspx?ID=275';" onmouseover=skm_mousedOverMenu('_ctl0_Menu1',this, document.getElementById('_ctl0_Menu1'), true, '');skm_shimSetVisibility(true,'_ctl0_Menu1-menuItem002-subMenu');this.className='mouseOverMenu';" onmouseout=skm_mousedOutMenu('_ctl0_Menu1', this, '');this.className='menuclass';">Se hvor let !</td>
     </tr><tr>
      <td class="menuclass" id="_ctl0_Menu1-menuItem003" onclick=skm_closeSubMenus(document.getElementById('_ctl0_Menu1'));location.href='default.aspx?ID=17';" onmouseover=skm_mousedOverMenu('_ctl0_Menu1',this, document.getElementById('_ctl0_Menu1'), true, '');skm_shimSetVisibility(true,'_ctl0_Menu1-menuItem003-subMenu');this.className='mouseOverMenu';" onmouseout=skm_mousedOutMenu('_ctl0_Menu1', this, '');this.className='menuclass';">Funktioner</td>
     </tr><tr>
      <td class="menuclass" id="_ctl0_Menu1-menuItem004" onclick=skm_closeSubMenus(document.getElementById('_ctl0_Menu1'));location.href='default.aspx?ID=157';" onmouseover=skm_mousedOverMenu('_ctl0_Menu1',this, document.getElementById('_ctl0_Menu1'), true, '');skm_shimSetVisibility(true,'_ctl0_Menu1-menuItem004-subMenu');this.className='mouseOverMenu';" onmouseout=skm_mousedOutMenu('_ctl0_Menu1', this, '');this.className='menuclass';">Eksempler</td>
     </tr><tr>
      <td class="menuclass" id="_ctl0_Menu1-menuItem005" onclick=skm_closeSubMenus(document.getElementById('_ctl0_Menu1'));location.href='default.aspx?ID=20';" onmouseover=skm_mousedOverMenu('_ctl0_Menu1',this, document.getElementById('_ctl0_Menu1'), true, '');skm_shimSetVisibility(true,'_ctl0_Menu1-menuItem005-subMenu');this.className='mouseOverMenu';" onmouseout=skm_mousedOutMenu('_ctl0_Menu1', this, '');this.className='menuclass';">Gratis demo</td>
     </tr><tr>
      <td class="menuclass" id="_ctl0_Menu1-menuItem006" onclick=skm_closeSubMenus(document.getElementById('_ctl0_Menu1'));location.href='default.aspx?ID=75';" onmouseover=skm_mousedOverMenu('_ctl0_Menu1',this, document.getElementById('_ctl0_Menu1'), true, '');skm_shimSetVisibility(true,'_ctl0_Menu1-menuItem006-subMenu');this.className='mouseOverMenu';" onmouseout=skm_mousedOutMenu('_ctl0_Menu1', this, '');this.className='menuclass';">Billig løsning</td>
     </tr><tr>
      <td class="menuclass" id="_ctl0_Menu1-menuItem007" onclick=skm_closeSubMenus(document.getElementById('_ctl0_Menu1'));location.href='default.aspx?ID=16';" onmouseover=skm_mousedOverMenu('_ctl0_Menu1',this, document.getElementById('_ctl0_Menu1'), true, '');skm_shimSetVisibility(true,'_ctl0_Menu1-menuItem007-subMenu');this.className='mouseOverMenu';" onmouseout=skm_mousedOutMenu('_ctl0_Menu1', this, '');this.className='menuclass';">Profil</td>
     </tr><tr>
      <td class="menuclass" id="_ctl0_Menu1-menuItem008" onclick=skm_closeSubMenus(document.getElementById('_ctl0_Menu1'));location.href='default.aspx?ID=66';" onmouseover=skm_mousedOverMenu('_ctl0_Menu1',this, document.getElementById('_ctl0_Menu1'), true, '');skm_shimSetVisibility(true,'_ctl0_Menu1-menuItem008-subMenu');this.className='mouseOverMenu';" onmouseout=skm_mousedOutMenu('_ctl0_Menu1', this, '');this.className='menuclass';">Kontakt</td>
     </tr>
    </table></div>
          <div id="content">
           <div class="utils"><A href='print.aspx?ID=161' target=_blank >print</A>
            <A href="mailto:info@kohsel.com" >email</A>
           </div>
           <span id="_ctl0_lblContent"><P>dette er en test : XXX ZZZ YYYY<BR><BR><IMG height=70 alt=test src="http://imageserver.dynasite.dk/default.aspx?ID=164&amp;width=50&amp;height=70" width=50 align=default><BR><BR>test XXXX YYYY ZZZZ &#198;&#216;&#197;<BR></P>
    <P>dddd</P>
    <P><INPUT class="" id=Text1 title="" src="" value=Text1>&nbsp;<INPUT class="" id=Submit1 title="" type=submit src="" value=Submit1></P>
    <P>Test</P></span>
           <div id="footer"><span id="_ctl0_lblFooter"><p align="center">&#169; copyright <strong>Kohsel Data 2005</strong> - tlf 8688 8848&#160; <a href="' href='http://www.kohsel.com/">www.kohsel.com
    '>http://www.kohsel.com/">www.kohsel.com</a> &#160;- <a href="@kohsel.com' href='mailto:info@kohsel.com">info@kohsel.com'>mailto:info@kohsel.com">info@kohsel.com</a></p></span></div>
          </div>
         </div> <!--class=side -->
         <div id="textMenu"><span id="_ctl0_lbltextmenu"><a href='default.aspx?ID=163' title='Forside'>Forside</a> | <a href='default.aspx?ID=76' title='Nem opdatering'>Nem opdatering</a> | <a href='default.aspx?ID=275' title='Se hvor let !'>Se hvor let !</a> | <a href='default.aspx?ID=17' title='Funktioner'>Funktioner</a> | <a href='default.aspx?ID=157' title='Eksempler'>Eksempler</a> | <a href='default.aspx?ID=20' title='Gratis demo'>Gratis demo</a> | <a href='default.aspx?ID=75' title='Billig løsning'>Billig løsning</a> | <a href='default.aspx?ID=16' title='Profil'>Profil</a> | <a href='default.aspx?ID=66' title='Kontakt'>Kontakt</a></span></div>
        </td>
       </tr>
      </table>
     
    <script language="javascript">
    <!--
     var skm_subMenuIDs =  new Array('_ctl0_Menu1');
      // -->
    </script>
       <script language="javascript">skm_registerMenu('_ctl0_Menu1',new skm_styleInfo('','','','','','','','','','selectedMenu'),new skm_styleInfo('','','','','','','','','','unselectedMenu'),2,false);</script>

      </form>
    </body>

    regards
    Lars Kohsel

  •  02-10-2005, 1:54 AM 4028 in reply to 3896

    Re: Forms in text ?

    Well, I have found that the problem lies within the missing "name" attribute. CuteEditor identifies the fields by the ID attribute but this value is not a part of the posting so the field becomes nameless. The problem is solved by manually adding the name attribute to the fields of the form.
     
    regards
    Lars Kohsel
  •  02-11-2005, 4:04 PM 4072 in reply to 4028

    Re: Forms in text ?

     
    Any update? have you resolved the problems with the version 4.0.0.4?

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  02-20-2006, 1:39 PM 16148 in reply to 4072

    Re: Forms in text ?

    We already use release 5.1 and we have this problem of no-name on forms controls.  The properties form of the control as name but it not capture our values. Where is the good release ? 
  •  02-20-2006, 1:45 PM 16149 in reply to 16148

    Re: Forms in text ?

View as RSS news feed in XML