www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > JavaScript

    JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...)

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 11-04-2009, 09:30 AM
    ericcoumans ericcoumans is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 2
    getElementsByName problem

    Hi there,

    I want to fill in a whole form just by pressing on 1 button.
    The code i used (local) for this is:

    <script language="javascript">
    <!--
    function text()
    {
    parent.frames['iFrame'].document.getElementsByName('FormField')[0].value = "Text to put in formfield";
    return true;
    }
    </script>

    <input type="button" value="Do It" onclick="text();">

    <iframe name="iFrame" id="DS156" src="http://www.otherdomain.com" width="500" height="500" frameborder="1">

    ==============================================

    Thing is, the content i want to post, must go to a different domainname.
    When i test the html file (with above code) locally, it puts all the information into the form (on the other website) succesfull.
    When i upload the html (with above code) to my webserver and test it in (for example) InternetExplorer, it says "Access Denied" and refers to the line parent.frames.... etc.

    Any idea how to solve this?

    Thanks!

    Eric
    Reply With Quote
      #2  
    Old 11-04-2009, 10:52 PM
    rnd me's Avatar
    rnd me rnd me is online now
    working on the chain...
     
    Join Date: Jul 2008
    Location: urbana, il
    Posts: 1,274
    make sure both pages are on the same domain if you want to use javascript.
    Reply With Quote
      #3  
    Old 11-05-2009, 04:02 AM
    ericcoumans ericcoumans is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 2
    Thanks, but thats the problem.

    I want information from 1 page filled in into another page on a different domain.
    It's not possible to place both websites on the same domain...

    I found this article, but didn't quite understand if this would help me...
    http://groups.google.com/group/csexw...lnk=raot&pli=1

    Thanks for the help
    Reply With Quote
      #4  
    Old 11-05-2009, 09:53 AM
    Kor's Avatar
    Kor Kor is offline
    Red Devil Moderator
     
    Join Date: Dec 2003
    Location: Bucharest, ROMANIA
    Posts: 11,143
    Quote:
    Originally Posted by ericcoumans View Post
    Thanks, but thats the problem.

    I want information from 1 page filled in into another page on a different domain.
    It's not possible to place both websites on the same domain...

    I found this article, but didn't quite understand if this would help me...
    http://groups.google.com/group/csexw...lnk=raot&pli=1

    Thanks for the help
    That article is about C#, I presume, that means a server-side language, not Javascript language.

    Javascript is a client-side language, thus it can not write/store data nor establish a cross-domain relationship. But you may do that on using AJAX+a server-side aplication+a database.
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    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


    All times are GMT -5. The time now is 06:45 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.