|
|||||||
| JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...) |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
make sure both pages are on the same domain if you want to use javascript.
__________________
libs: mini (updated) ASPmini myIO (new) dnd tmpl8 apps: snippets blog photos crypto image editor crapplets: json browse json view compressor time grads |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
||||
|
||||
|
Quote:
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. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|