Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Iframe in Firefox / Safari

Posted on 2006-04-20
5
Medium Priority
?
766 Views
Last Modified: 2008-03-17
Hi all,
I have sth. like this (it's aspx page)

<body>
  <form id="Form1" method="post" runat="server">
    <INPUT type="file" id="file1" runat="server" />
    <asp:Button ID="btnSubmit" Text="Submit" Runat="server" /><br>
    <IFRAME id="frame1" ></IFRAME>
  </form>
</body>

btnSubmit.Attributes.Add("OnClick","updateIframe();");

when the button is clicked, it will run JS function as well as server side function

function updateIframe()
{
   document.getElementById(frame1).src = "a.aspx";
}

in fact in "a.aspx", it is just a page which uses meta refresh every second to get new information

the code works well in IE,
but the src of Iframe doesn't update at all in Firefox / Safari, it simply runs the server side function only
any ideas?
thanks a lot !!!
0
Comment
Question by:orbulat
  • 2
4 Comments
 
LVL 9

Expert Comment

by:smaccari
ID: 16496083
Try this:

<body>
  <form id="Form1" method="post" runat="server">
    <INPUT type="file" id="file1" runat="server" />
    <asp:Button ID="btnSubmit" Text="Submit" Runat="server" /><br>
    <IFRAME id="frame1" name="frame1"></IFRAME>
  </form>
</body>

And this JS function:

function updateIframe()
{
   frames["frame1"].location.href = "a.aspx";
}
0
 
LVL 10

Author Comment

by:orbulat
ID: 16503795
thx
but seems that it can't help, the page simply runs the server function and post back, and the iframe remains unchanged
0
 
LVL 10

Author Comment

by:orbulat
ID: 16504589
anyways, i give it up and use another method
thx for your effort
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16547203
Closed, 500 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

564 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