473,854 Members | 1,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to fill the form on another domain

nte
Hi.

I have a site where users can open their profiles and provide some
personal data.

On a user's button click, I want to open a new window and show some
page that
is hosted on another domain (I don't have any access to the code on
another domain).

Now since I already have the data necessary to fill the form on
external page, I
would like to do it with javascript instead of making the user fill
the same thing
over again.

This is what I have tried to do:
var targetWindow = window.open ('http://www.targetsite. com');

targetWindow.do cument.getEleme ntById("field1" ).value = "value1";
targetWindow.do cument.getEleme ntById("field2" ).value = "value2";
targetWindow.do cument.getEleme ntById("Button" ).submit();
Of course, this works only when this code snippet is executed on the
same domain as the form that I want to fill (targetsite). Otherwise, I
receive
Access is denied error on the line where I want to fill field1.
How to solve this problem?

Many thanks.

Feb 2 '07 #1
2 4378
VK
On Feb 2, 7:46 pm, n...@index.hr wrote:
Hi.

I have a site where users can open their profiles and provide some
personal data.

On a user's button click, I want to open a new window and show some
page that
is hosted on another domain (I don't have any access to the code on
another domain).

Now since I already have the data necessary to fill the form on
external page, I
would like to do it with javascript instead of making the user fill
the same thing
over again.

This is what I have tried to do:

var targetWindow = window.open ('http://www.targetsite. com');

targetWindow.do cument.getEleme ntById("field1" ).value = "value1";
targetWindow.do cument.getEleme ntById("field2" ).value = "value2";
targetWindow.do cument.getEleme ntById("Button" ).submit();

Of course, this works only when this code snippet is executed on the
same domain as the form that I want to fill (targetsite). Otherwise, I
receive
Access is denied error on the line where I want to fill field1.

How to solve this problem?
You can't.

P.S. Presumed that you cannot change default security settings on each
client machine.
Feb 2 '07 #2
Ivo
<nt*@index.hrsc hreef
On a user's button click, I want to open a new window and show some
page that is hosted on another domain (I don't have any access to the
code on another domain).
Now since I already have the data necessary to fill the form on
external page, I would like to do it with javascript instead of making
the user fill the same thing over again.
This is what I have tried to do:

var targetWindow = window.open ('http://www.targetsite. com');

targetWindow.do cument.getEleme ntById("field1" ).value = "value1";
targetWindow.do cument.getEleme ntById("field2" ).value = "value2";
targetWindow.do cument.getEleme ntById("Button" ).submit();

Of course, this works only when this code snippet is executed on the
same domain as the form that I want to fill (targetsite). Otherwise, I
receive
Access is denied error on the line where I want to fill field1.
How to solve this problem?
Filling in the formfields on the page of the other site is not going to
happen. But you can look at the source, see where their form is being sent
to, and then make up a form on your own domain with fields of the same name
and send it to the same place. If their code doesn't check the address from
which the form is coming then the result will be just the same.
HTH, i.
http://4umi.com/web/javascript/

Feb 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1135
by: James Bender | last post by:
Hi, I am writing an application that needs to access the AD on another domain. I have a login with the access I need, and I am using the Directory Entry/Directory Searcher objects to get the items. How can I set these up to look at another domain? PS. I am VERY new to AD, so be gentle. Thanks
3
1839
by: euphorica | last post by:
I am making an inventory database. I have a field InventoryNumber where I put a specific code. The code always starts with a particular letter. I would like to fill in another field with specific information based on what that letter is. Can somebody show me how to do this? Thanks in advance.
4
5529
by: C#User | last post by:
hi, For the local sql server, the connection string is like: Data Source=(local);Integrated Security=SSPI;Connection Timeout=5;DataBase=northwind But for another sql server on another domain, what the connection string should look like?? i appreciate your help!
1
1064
by: Grey | last post by:
Can I connect the SQL Server DB from another domain?? If so, is there any parameter changing in order to connect it? Million Thanks
1
2215
by: sincethe2004 | last post by:
By using <authentication mode="Forms" > in web.config, we can create self-designed login page, but how to check user's account and password is vaild in another domain controller? Does <authentication mode="Windows"> can have self-designed login page?
1
1169
by: Grey | last post by:
I need to use one VS.NET from one domain, DomainA, to connecting the IIS web server in another domain, DomainB. However, I got an error when I try to run the project. Error Message "Error while trying to run project: Unable to start debugging on the web server. Access denied. Verify that you are an administrator or a member of the 'Debugger Users' group on the machine you are tyring to debug. After being added to the 'Debugger Users'...
0
12092
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the likelihood of CRM success from less than 20 percent to 60 percent. WHITEPAPER :
9
2071
by: ad | last post by:
I use the codes below to clear the cookie: HttpCookie myCookie = new HttpCookie("us_id"); myCookie.Expires = DateTime.Now.AddDays(-1d); Response.Cookies.Add(myCookie); It do well when the cookie is from the web application itself, But fail to clear when the cookie is form another application, like php. How can I do?
8
3606
by: pankaj17 | last post by:
hello, Is it possible to communicate with another domain javascript function using ajax. Suppose i have a iframe and domain is different and in the iframe i have some links. If user clicks on that link i want to call javascript function written in main page (not in iframe). is this possible using ajax to call the java script function of another domain. if possible please tell me the example. if not please tell me the another way. please...
0
9901
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9751
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11024
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10679
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10370
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9513
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5741
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4154
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3186
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.