Firefox not populating dynamic form fields

Last post 09-22-2006, 4:39 PM by Adam. 12 replies.
Sort Posts: Previous Next
  •  05-02-2006, 3:39 AM 18676

    Firefox not populating dynamic form fields

    I am currently developing a simple Event-management solution in ASP.  I have downloaded and installed your product and things are going relatively smoothly.  However, I have noticed that there is a problem with Firefox when refreshing the page and repopulating form fields.  Some drop-down menus are dynamically driven, so there is a server request and the form fields are populated with the user's inputs thus far.  This works with all normal text fields, but not with CE fields (but only with Firefox - IE seems to populate the CE fields just fine).  I am running Firefox 1.5.0.2.  I have 2 CE editors on the same page (I believe I am running v 5.1).  The odd thing is that sometimes the CE fields DO populate with the user's content, but most of the time they do not.

    Here is the code instantiating the editors:
    *Description:

    <%
    content = gBody
    Dim editor
    Set editor = New CuteEditor

    editor.ID = "Body"
    editor.Text = content
    editor.FilesPath = "/CuteEditor_Files"
    editor.ImageGalleryPath = "/EventImages/"
    'Body.Setting("security:ImageGalleryPath")= "/uploads"
    'editor.MaxImageSize = 5000
    editor.AutoConfigure = "Minimal"
    editor.TemplateItemList = "netspell,Bold,Italic,Underline,JustifyLeft,JustifyCenter,JustifyRight"

    editor.Width = 400
    editor.Height = 200
    editor.Draw()

    ' Request.Form(ID) access from other page
    %>


    Photo:

    <%
    pcontent = gPhoto
    'Dim editorPhoto
    Set editorPhoto = New CuteEditor

    editorPhoto.ID = "Photo"
    editorPhoto.Text = pcontent
    editorPhoto.FilesPath = "/CuteEditor_Files"
    editorPhoto.ImageGalleryPath = "/EventImages/"
    'Body.Setting("security:ImageGalleryPath")= "/uploads"
    editorPhoto.MaxImageSize = 5000
    editorPhoto.AutoConfigure = "Minimal"
    editorPhoto.TemplateItemList = "insertimage"

    editorPhoto.Width = 200
    editorPhoto.Height = 150
    editorPhoto.Draw()

    ' Request.Form(ID) access from other page
    %>

    And the relevant code at the top of the page for the variable assignation is:

    gBody = Request.Form("Body")
    gPhoto = Request.Form("Photo")

    Like I said - IE works fine, but Firefox does not populate the fields.  Any help?

    Thanks - Kevin


  •  05-02-2006, 5:39 AM 18679 in reply to 18676

    Re: Firefox not populating dynamic form fields

    Just a note, when you have more than one CE on a page, you should for sanaity sake, set the following
     
    editor.SubSequent = true
    From the help file
     
    "The Subsequent property If you have more than one editor on a page it is recommended that you call the subsequent() function on all editors except the first editor. The subsequent function will generate a specially configured editor that will share resources with the first editor on the page. This will greatly improve performance. Note that if you do not use the subsequent() function your multiple instances will still run, but may load slower than necessary. "
     
     
    This may or may not help your problem
     
    RC
     
     
  •  05-02-2006, 10:09 AM 18689 in reply to 18679

    Re: Firefox not populating dynamic form fields

    Thanks for the tip, but this did not solve my problem.  Anyone else have any ideas?

  •  05-02-2006, 2:24 PM 18705 in reply to 18676

    Re: Firefox not populating dynamic form fields

    Kevin,
     
    Please check the following example:
     
     
    You can find the source code of the above example in the download package:
     
    Also please change
     
    editor.Text = content
    editorPhoto.Text = pcontent
     
    to
    editor.Text = "First Editor"
    editorPhoto.Text = "Second Editor"
     
    Keep me posted
     
     
     
     
     
     

    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

  •  09-21-2006, 6:13 PM 22924 in reply to 18705

    Re: Firefox not populating dynamic form fields

    Why would I want to change the editor.Text to equal "First Editor"?  I want the content to appear in the window, not the string "First Editor".  Perhaps you meant something else?


  •  09-21-2006, 8:14 PM 22931 in reply to 22924

    Re: Firefox not populating dynamic form fields

    Kevin,
     
    I just want to make it as simple as possible.  After we set up multiple editors successfully with this simple setting, we can pass the content of your application to the editors.
     
    Have you successfully run this example?
     
     

    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

  •  09-21-2006, 8:40 PM 22933 in reply to 22931

    Re: Firefox not populating dynamic form fields

    I can view both editors and they have different content.  If that's what you mean, then yes.

    When I hard-coded the strings "First Editor" and "Second Editor" into the instantiation script, they both reappeared after a refresh.  Just not when the content isn't hard-coded, but rather typed in normally. 

    I also can't print out the Request.Form("Body") content elsewhere in the page.  Request.Form("Body") is blank, but only with Firefox.  The same code prints out the Request.Form("Body") in the CE Editor and elsewhere in the page just fine in IE.



  •  09-21-2006, 8:53 PM 22935 in reply to 22933

    Re: Firefox not populating dynamic form fields

    I'm not sure if this is relevant, but there seems to be a difference between how Firefox and IE refresh.  When I go to your multiple example page in IE, change some of the content and hit REFRESH, the content does NOT change.  It stays the same.  When I visit that multiple example page in Firefox, change some content, then hit REFRESH, the content DOES change.  It seems as though IE's refresh is always a "full" refresh, whereas Firefox's refresh is not (perhaps Firefox's refresh combines it with a POST command?)

    Also, interesting enough, back on my asp page that I'm having trouble with: if I type in some content into the CE editor (in Firefox) and click on the refresh button, the content DOES reappear after the page reloads.  If I hit shift-REFRESH (Firefox's "full" refresh") then the content disappears.

    Hope this may help troubleshoot this.

  •  09-21-2006, 10:02 PM 22938 in reply to 22935

    Re: Firefox not populating dynamic form fields

    One last comment, just to be clear:

    The way my page posts the form data is this: On the drop-down menus, I have an onchange event handler that calls a javascript function:

    <SELECT name="LocationID" id="LocationID" onchange="SubmitThis(this)">

    The Javascript function looks like this:  I have to change the action because normally the form would submit to another page


    function SubmitThis(theObject)
    {
        if(theObject.options[theObject.selectedIndex].value != "")
        {
        document.AddEvent.action = "AddEvent.asp"; <-- this is the page we are currently on
        document.AddEvent.submit();
       
       return true;
       }
    }

    So I'm basically changing the action and simply submitting the form, via Javascript.

    Then, when the form is submitted, at the top of my code I just assign the CE Editor's text to a variable. 

    gBody = Request.Form("Body")  <-- this is the ID of the CE Editor in question.

    This is the code for the Editor:

        content = gBody
       
        Dim editor
        Set editor = New CuteEditor
       
        editor.ID = "Body"
        editor.Text = content
        editor.MaxHTMLLength = 2000
        editor.FilesPath = "/CuteEditor_Files"
        editor.ImageGalleryPath = "/EventImages/"
        'Body.Setting("security:ImageGalleryPath")= "/uploads"
        'editor.MaxImageSize = 5000
        editor.AutoConfigure = "Minimal"
        editor.TemplateItemList = "netspell,Bold,Italic,Underline,JustifyLeft,JustifyCenter,JustifyRight"
       
        editor.Width = 400
        editor.Height = 200
        editor.Draw()

    Just wanted to be clear about it.

    Thanks.
  •  09-22-2006, 3:55 PM 22982 in reply to 22938

    Re: Firefox not populating dynamic form fields

    Adam - no response to this?  Seems like a few ppl were having the same issue.  I'm on a bit of a deadline, so I was hoping for some response today.  Thanks.
  •  09-22-2006, 4:23 PM 22987 in reply to 22938

    Re: Firefox not populating dynamic form fields

    Kevin Rogers,
     
    Please create a simple asp page which contains the editors only and put it online and make sure this example can demonstrate the problems.
     
    I also need to know what the problem is and how to reproduce this issue.
     
     
     

    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

  •  09-22-2006, 4:32 PM 22988 in reply to 22987

    Re: Firefox not populating dynamic form fields

    Adam - I'd prefer to not post the link to the forum.  Send me an email so I can give you the link:  rootdesignREMOVEME@yahoo.com 

    Obviously remove the REMOVEME in the address.  Thanks.

  •  09-22-2006, 4:39 PM 22993 in reply to 22988

    Re: Firefox not populating dynamic form fields

    Kevin,
     
    You can send the link to me through PM or email Adam AT CuteSoft.net.
     
     

    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

View as RSS news feed in XML