Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

submit a form from another frame

Posted on 2000-03-02
5
Medium Priority
?
247 Views
Last Modified: 2010-04-09
Hi......
How can I submit the form thats on frame 1 when I click a href thats in frame 2.
0
Comment
Question by:rickyr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
jbirk earned 200 total points
ID: 2576321
First they both have to be on the same domain, otherwise you won't have permission to do it (security violation).

The link on frame 2:
<A HREF="JavaScript:void(0);" onClick="top.frame1.formname.submit(); return false;">

Frame1 is the name of frame 1, and formname is the name of the form.  Change these as necesary.

-Josh
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2576331
Oops.  needs to be:
<A HREF="JavaScript:void(0);" onClick="top.frame1.document.formname.submit(); return false;">

-Josh
0
 
LVL 3

Author Comment

by:rickyr
ID: 2576430
looks good, but what about the HREF query string I already have in there? What should I do with that?
Thanks
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2576499
You have something else going on in the href, or in the form?
If it's just the link, you can leave what you have in the href, and change the onClick event to return true.  That way the href default action will still take place.

-Josh
0
 
LVL 3

Author Comment

by:rickyr
ID: 2623066
Ta
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question