LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-23-2006, 02:26 PM   #1
AM1SHFURN1TURE
Member
 
Registered: Sep 2004
Location: US
Distribution: Debian
Posts: 56

Rep: Reputation: 15
javascript - submit an iframe form


i have been trying

<iframe id="fid" name="fname" src="http://www.google.com/"></iframe>
<script>

function submitForm(){

window.frames[0].document.forms[0].submit();


}

<input type="submit" value="try" name="button"
onclick="submitForm();">
</script>


and it will not do a thing, I have also tried several other ways to do this - and other people say it works for them, but not for me. I tried both IE and firefox.
 
Old 09-23-2006, 05:51 PM   #2
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Any reasonable browser shouldn't give you access to the iframe. That's probably your problem. They do this to prevent cross site scripting attacks. Check out Wikipedia to find out why allowing access is bad.

Note: I just checked MS's docs, and they say they allow it as long as it's in the same domain. Since I'm guessing you don't work for google, the above applies.

Last edited by 95se; 09-23-2006 at 05:53 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I "submit" an HTML <Form> with Javascript? nickiv Programming 3 06-13-2005 06:41 AM
javascript: change value of text field and submit codec Programming 3 06-06-2005 08:08 AM
submit a form with javascript djgerbavore Programming 6 06-01-2005 02:46 PM
Authentication by Submit Form in Apache??????? ruiseixas Linux - Security 1 11-22-2003 11:02 PM
shell script form submit precioso77 Linux - General 2 05-18-2003 11:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration