Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 08-31-2007, 03:41 PM
ivenms ivenms is offline
Member
 
Join Date: 09-30-06
Posts: 41
iTrader: 0 / 0%
Question How to Change the Text Field of a Remote File with JavaScript?

Suppose:

I made a page that had an IFrame on it.

The IFrame's source file is a remote file.

The main intension is to change the form field values of the IFrame page by running the JavaScript function I made on my page. This means that the IFrame's forms field will filled automatically.

How is it possible....

Please help me.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 08-31-2007, 04:55 PM
kos's Avatar
kos kos is offline
Coding Tiger
 
Join Date: 04-13-07
Location: .ro
Posts: 4,029
iTrader: 3 / 100%
maybe json could be the answer to your question.
this is where you can find a lot of examples on how to use remote access scripts: http://betterexplained.com/

hope this helps, 'cause I have no idea how to do that...
 
Reply With Quote
  #3  
Old 08-31-2007, 09:48 PM
HostSentry.net HostSentry.net is offline
Junior Member
 
Join Date: 08-26-07
Posts: 19
iTrader: 0 / 0%
This will work without security problems if the iframe is in the same domain as the main page. Replace document with the id of the iframe and you can target it easily.

For instance if the id of the input in the Iframe is "box", and the id of the iframe is "theframe"... use this:

Code:
theframe.getElementById("box").value = "v7n ftw";
 
Reply With Quote
  #4  
Old 09-01-2007, 03:38 AM
ivenms ivenms is offline
Member
 
Join Date: 09-30-06
Posts: 41
iTrader: 0 / 0%
I need to change the field of a remote file on the IFRAME. Not on the same domain.

I tried many ways. But all results in failure.

So hopping to find a good result from here.
 
Reply With Quote
  #5  
Old 09-02-2007, 12:27 PM
HostSentry.net HostSentry.net is offline
Junior Member
 
Join Date: 08-26-07
Posts: 19
iTrader: 0 / 0%
Quote:
Originally Posted by ivenms View Post
I need to change the field of a remote file on the IFRAME. Not on the same domain.

I tried many ways. But all results in failure.

So hopping to find a good result from here.
Right... so the Iframe targets a different domain name. You will get a sandbox error if you get close to doing it correctly. It's not possible in any good browser for security reasons. If you could control an iframe that points to a different server, you could do anything you wanted.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to link javascript to an external file? NameJunky Coding Forum 3 01-25-2008 02:47 AM
How do I set up a user file submission field rs217000 Web Design Lobby 6 09-13-2006 04:18 PM
how to change read/write permissions of a file? Calisonder Coding Forum 4 07-19-2006 06:51 PM
Your recommended Form Field Validation Javascript bestempire Coding Forum 1 05-30-2006 07:18 AM
Javascript: Dynmically change match criteria in RegExp?? Once Coding Forum 0 06-03-2004 01:16 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 09:35 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC