473,473 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to change textbox words in another frame in different domain?

123 New Member
For example, i have 2 frame, one in left side and one in right side.

for the right side frame, i can;t alter the code in the right frame and i just know
it have a textbox id=customer

then i want to write a left frame by myself and when i click the button,
the right frame textbox word will change as what I set.

Is it possible?
Sep 6 '07 #1
17 3153
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

Yes, it is possible. See this link. If you get stuck, post your code.
Sep 6 '07 #2
perhapscwk
123 New Member
It not works...help...

This one is the index.htm file
[HTML]<HTML>
<HEAD>
<TITLE>main</TITLE>

</HEAD>
<FRAMESET cols="20%, 80%">
<FRAME name=left src="main.htm">
<FRAME name=right src="aaaaa.htm">
</FRAMESET>
</html>
[/HTML]

This one is main.htm
[HTML]<button
onclick="parent.right.document.getElementById('cel lright').innerHTML=
'New words'">
Change</button>
[/HTML]
This one is the file aaaaa.htm
[HTML]<input type="text" size="14" id="cellright" value="Hello"></input>[/HTML]

For aaaaa.htm, I don;t want to modify it...but when i click the button in main.htm..it suppose the textbox in aaaaa.htm should change from "Hello" to "New words"...HELP.

thanks.
Sep 6 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
Change the code to:[HTML]<button onclick="parent.right.document.getElementById('cel lright').value='New words'">Change</button>[/HTML]
Sep 7 '07 #4
perhapscwk
123 New Member
I try to make the gmail.com as the right frame, and there have a textbox username and password...for the password textbox..it id is "Passwd".

So in left frame, i use

[HTML]<button onclick="parent.right.document.getElementById('Pas swd'). value='1234567'">add pwd</button>[/HTML]

But it not works? Why?
Sep 12 '07 #5
acoder
16,027 Recognized Expert Moderator MVP
The frame is from a different domain. Try a page from the same domain.
Sep 12 '07 #6
perhapscwk
123 New Member
We can;t do anything if it is from a different domain?
Sep 12 '07 #7
acoder
16,027 Recognized Expert Moderator MVP
We can;t do anything if it is from a different domain?
Well, you may find one or two workarounds, but no, because of security restrictions, cross-domain scripting is not possible.
Sep 12 '07 #8
perhapscwk
123 New Member
Is there any ways we can make something to help us input information to
textbox which in different domain?
Sep 13 '07 #9
gits
5,390 Recognized Expert Moderator Expert
hi ...

moved from js-article-section to the forum-section ... please don't post questions in the articles-section ...

kind regards
Sep 13 '07 #10
dmjpro
2,476 Top Contributor
Is there any ways we can make something to help us input information to
textbox which in different domain?
Be specific little bit more!

Kind regards,
Dmjpro.
Sep 13 '07 #11
acoder
16,027 Recognized Expert Moderator MVP
Is there any ways we can make something to help us input information to
textbox which in different domain?
This is not possible due to security restrictions. See this link.
Sep 13 '07 #12
perhapscwk
123 New Member
I try to make the gmail.com as the right frame, and there have a textbox username and password...for the password textbox..it id is "Passwd".

So in left frame, i use


[HTML]<button onclick="parent.right.document.getElementById('Pas swd'). value='1234567'">add pwd</button>[/HTML]

However it not works....i have been told the problem is because the script will work only if it in the same domain.

I want to ask is there any others ways i can do for it?

thanks very much.
Sep 13 '07 #13
dmjpro
2,476 Top Contributor
I try to make the gmail.com as the right frame, and there have a textbox username and password...for the password textbox..it id is "Passwd".

So in left frame, i use


[HTML]<button onclick="parent.right.document.getElementById('Pas swd'). value='1234567'">add pwd</button>[/HTML]

However it not works....i have been told the problem is because the script will work only if it in the same domain.

I want to ask is there any others ways i can do for it?

thanks very much.
You are sure that the password field is Passwd?
I think you are sure.
And I assume that right frame name is right.

Now try this, I think it will work...........!
Expand|Select|Wrap|Line Numbers
  1. parent.document.frames['right'].document.getElementById('Passwd').value='1234567';
  2.  
Good Luck!

Kind regards,
Dmjpro.
Sep 13 '07 #14
perhapscwk
123 New Member
it not works..............
Sep 13 '07 #15
gits
5,390 Recognized Expert Moderator Expert
hi ...

as it was said :) ... for security reasons you cannot do cross-site-scripting ...

kind regards
Sep 13 '07 #16
dmjpro
2,476 Top Contributor
hi ...

as it was said :) ... for security reasons you cannot do cross-site-scripting ...

kind regards
What an Idea Gits!
I went through in normal way but failed.
How does this Browser decide that cross you do Cross-Site Scripting?
Please answer me.

Kind regards,
Dmjpro.
Sep 14 '07 #17
gits
5,390 Recognized Expert Moderator Expert
hi ...

read the information behind the link
that acoder posted already ...

kind regards
Sep 14 '07 #18

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ori | last post by:
Hi! This is my problem... I have two frames. one which is my website (top frame), and the other is someone else website. I want to simulate a submit in the other website (lower frame)when a...
2
by: google | last post by:
I have a HTML file that contains an iframe. The HTML file is served by one server. The iframe contains a link to a completely different server. My question is, can any action in the iframe (such...
2
by: A. Jamie Cuticchia | last post by:
I have a webpage with 2 frames. Each frame accesses a different URL. When I try to run a javascript from Frame 1 to access content in Frame 2, I get a forbidden error. Is there a solution to...
3
by: Chip | last post by:
Here's the problem: I need to look up records from Library of Congress and associate the data to a book in my database. Here's how I think it should work. Open the Library of Congress search page...
17
by: Bruno | last post by:
I have a feature that is hosted on a different domain from the primary one in a frame, and need to retain values in a cookie. example: A web page at one.com contains a frame which has a page...
2
by: J | last post by:
Hello. I apologize if this isn't the appropriate group for this question but I was wondering if it's possible to allow regular windows domain users to change their passwords through an .asp page? ...
42
by: smerf | last post by:
Using javascript, is there a way to trap an external page inside a frame? I've seen scripts to break out of frames, but nothing to keep a page trapped in a frame.
1
by: redgoals | last post by:
Hi All, I will be creating a white label website for car hire dealers. My main website will be called something like: carhire.com, the content on carhire.com will be pulled in from a database. ...
0
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.