Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Getting my iFrame+reload-button to JavaScript?

Posted on 2009-03-31
7
Medium Priority
?
403 Views
Last Modified: 2012-05-06
Hey! I have on my homepage several iFrames right now, and above each iFrame is an "reload"-button for that frame.

<INPUT TYPE="image" src="refresh.jpg" onClick="frame1.location.reload(true)">  <b>Breakfast:</b><br><br>
<iframe  src="frame1.php" name="frame1" frameborder="0" width="370" height="95" scrolling="no">Your browser doesn't support iFrames.</iframe>

But there is some problems with that. The reload-button asks this "[To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier?]" when trying to reload my php when an user has changed it. It should still be able to reload properply without asking that.
And second of all, my iFrames can't autoresize depending on its content.
So I thought about getting those two things over to a JavaScript.

I have looked at http://www.prototypejs.org/ . Is that what should be used to do it? Seems so huge for a simple script :-( How would I go about doing it, and where should I start? I have never done any Javascript before in my life. Thanks
0
Comment
Question by:MisterHamper
  • 4
  • 3
7 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 1500 total points
ID: 24036770
To stop the browser from alerting, you need to use method="get" in your forms instead of method="post"
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24036775
And resizing an iframe based on content is not simple.

However prototype is not needed

http://www.google.com/search?q=resize+iframe+content
0
 

Author Comment

by:MisterHamper
ID: 24036811
Thanks guys, I will try those two suggestions. Hopefully I won't even have to make the switch to AJAX prototype then :-)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24036834
I am only one guy ;)
0
 

Author Comment

by:MisterHamper
ID: 24036868
Yeah sorry just saw that :D

But it works now, with _GET
I couldn't get iFrame resizing to work :( but that isn't that important either. Thanks for the help!
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24036902
So the "B" grade is due to you not being able to implement any of the 1000 scripts I linked to?
Oh well ;)
0
 

Author Comment

by:MisterHamper
ID: 24036924
I have tried alot of implenting those auto-resize the last couple days, but none of them have worked for me sadly, but maybe I should just try some more :-)
But I do appreciate your tip about the _GET, thank you for that :-) Have a nice day, good sir
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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

963 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