SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    access is denied, everything on same server, no iframe

    ok forget my last post...i am now just dynamically generating my form using div.innerHTML. I am including two javascript classes, AdminManager and FormManager, which handle the creation and validation of the forms. Just to be sure I added the document.domain = "mydomain.com" on all the files...i'm still getting that error. There's no cross-domain issues anywhere...yet I am still not allowed to submit the form in IE. Anyone have any idea whats going on?
    From here on, it's instinctual...even straight roads meander.

  2. #2
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    even tried putting everything in one page...still getting the error. I guess you jsut cant submit a dynamically generated form in IE?
    From here on, it's instinctual...even straight roads meander.

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know if this is your problem. I know this default setting, in all current versions of IE, must be changed to use ADO on the same domain.

    http://support.microsoft.com/default...;EN-US;Q260260

  4. #4
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for that link..still not the problem though. I went and changed that setting just to be sure, still getting that error.
    From here on, it's instinctual...even straight roads meander.

  5. #5
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code+link would help.

  6. #6
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    true...here it is...i removed some methods of both objects for readability. You can check out the link here:

    http://www.heavenspot.com/clients/k2/new_k2/admin.php

    again, everything works perfect in mozilla, its just IE thats giving me the problem. It will validate the form right down to the actual form submision, thats where i get the error.


    PHP Code:
    <script type="text/javascript" language="javascript1.4">
          
          
    document.domain "heavenspot.com";
          
          
    //admin manager, controls diplay of the page
          
    function AdminManager (){
              
          }
        
        
    //handles creating new elements
        
    AdminManager.prototype.addNewElem = function(parentNodenewNodeNameattObj){
            
            var 
    node document.createElement(newNodeName);
            
            for(var 
    p in attObj){
                
    node.setAttribute(
                    
    == "className" "class" p
                    
    attObj[p]);
            }
            
            for(var 
    3arguments.lengthi++) {
                var 
    arguments[i];
                if(
    typeof c == "string"){
                    
    node.appendChild(document.createTextNode(c));
                }else{        
                    
    node.appendChild(c);
                }
            }
            
            
    parentNode.appendChild(node);
            
            return 
    node;
        }
       
       
    //add a reference to the form manager
       
    AdminManager.prototype.setFormManager = function (form_manager){
           
    this.formManager form_manager;
       }
       
        
        
          
          
    //see if the formDiv exisits, if not , create it and fill it with the proper form
          
    AdminManager.prototype.onCreateNewRecordClick = function (choiceID){
              
              if (!
    document.getElementById("formDiv")){
                  var 
    contentDiv document.getElementById("content");
                  var 
    formDiv  this.addNewElem(contentDiv'DIV', {id:'formDiv'} );
                  
    formDiv.innerHTML this.formManager.createForm(choiceID);
              }
              
          }
          
          
          
    //this function just calls the FormManager object.s checkForm function
          
    AdminManager.prototype.checkForm = function(whichForm){
              
    //alert('admin check form');
              //var form = document.getElementById('gsf_form');
              //form.submit();
              
    this.formManager.checkForm(whichForm);
          }
          
          
          
          
          
          
    //FormManager object..handles generating and validating the form
          
    function FormManager(){
              
    alert('new FormManager created');
          }
          
          
          
    FormManager.prototype.checkForm = function (which){
              
    this['check_'+which+'_form']();
          }
          
          
          
    FormManager.prototype.createForm = function(which){
              
              var 
    formString this['create_'+which+'_form']();
              
              return 
    formString;
              
          }
          
          
          
    FormManager.prototype.create_gsf_form = function(){
         return 
    '<form action="addNewRecord.php" method="post" enctype="multipart/form-data" name="gsf_form" id="gsf_form"> <table width="55%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" valign="top"><p>Title:<br> <input name="titleTF" type="text" id="titleTF" size="40" maxlength="70"> <br> Synopsis:                 <br> <textarea name="synopsisTF" cols="30" rows="10" id="synopsisTF"></textarea> <br> Year:<br> <input name="yearTF" type="text" id="yearTF" size="30" maxlength="4"> <br> Image:<br> <input name="imgTF" type="file" id="imgTF" size="30" maxlength="50"> <br> Length:<br> <input name="lengthTF" type="text" id="lengthTF" size="30" maxlength="30"> <br> Available:<br> <input name="availableTF" type="text" id="availableTF" size="30" maxlength="12"> <br> <br> <br> </p> </td> <td width="50%" valign="top"> <p>Notes:<br> <input name="notesTF" type="text" id="notesTF" size="30" maxlength="255"> <br> Producer:<br> <input name="producerTF" type="text" id="producerTF" size="30" maxlength="70"> <br> Director:<br> <input name="directorTF" type="text" id="directorTF" size="30" maxlength="70"> <br> U.S. Box Office:<br> $ <input name="us_boTF" type="text" id="us_boTF" size="10" maxlength="15"> <br> Foreign Box Office:<br> $ <input name="f_boTF" type="text" id="f_boTF" size="10" maxlength="15"> <br> Narration:<br> <input name="narrationTF" type="text" id="narrationTF" size="30" maxlength="50"> </p> <p> <input name="formID" type="hidden" id="formID" value="gsf">          </p></td> </tr> </table> <p> <input name="addRecordBtn" type="button" id="addRecordBtn" value="Add Record" onClick="manager.checkForm(\'gsf\');"> </p> </form>';
          }
          
          
          
    FormManager.prototype.check_gsf_form = function(){
             
             var 
    form document.getElementById('gsf_form');
             
             
    //these are the required form values...other form values are optional
             
    var title document.getElementById('titleTF').value;
             var 
    synopsis document.getElementById('synopsisTF').value;
             var 
    year document.getElementById('yearTF').value;
             var 
    image document.getElementById('imgTF').value;
             var 
    length document.getElementById('lengthTF').value;
             var 
    available document.getElementById('availableTF').value;
         
             
             
             if (
    title == ""){
                 
    alert("A title is required.");
                 return 
    false;
             }else if (
    synopsis == ""){
                 
    alert("A synopsis is required.");
                 return 
    false;
             }else if (
    year == ""){
                 
    alert("A year is required.");
                 return 
    false;
             }else if (
    image == ""){
                 
    alert("An image is required.");
                 return 
    false;
             }else if (
    length == ""){
                 
    alert("An length is required.");
                 return 
    false;
             }else if (
    available == ""){
                 
    alert("Available formats are required.");
                 return 
    false;
             }
             
             
    form.submit();
             
         }
          
      var 
    manager = new AdminManager();
       var 
    = new FormManager();
       
    manager.setFormManager(f); 
    From here on, it's instinctual...even straight roads meander.

  7. #7
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    after doing some more testing, it appears taht the problem is that I am using a file input in my form. If i take that out, everything works fine in IE. Does anyone know if its actaully possible to mix dynamci forms and file inputs? I know you can't actually set the value of the file input fields dynamically...that's ok, i need the user to select a file manually.
    From here on, it's instinctual...even straight roads meander.

  8. #8
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow, i actually got it...i was actually going into the file field and typing something in to test it. I had to make sure and click the "browse" button and choose a file to get it to work right. ordinairly i'd be pissed at somethign like that but I can deal with that extra security on my computer.
    From here on, it's instinctual...even straight roads meander.

  9. #9
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Roadie
    after doing some more testing, it appears taht the problem is that I am using a file input in my form. If i take that out, everything works fine in IE. Does anyone know if its actaully possible to mix dynamci forms and file inputs?
    Odd. You should be able to mix them.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

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