Solved

Getting my iFrame+reload-button to JavaScript?

Posted on 2009-03-31
7
385 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
[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
  • 4
  • 3
7 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help with this homework problem. 5 78
Jquery Calculation 3 42
Not picking up custom HTML-5 elements on page? 9 23
radio button onclick function 2 15
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses how to create an extensible mechanism for linked drop downs.
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

751 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