Solved

Getting my iFrame+reload-button to JavaScript?

Posted on 2009-03-31
7
371 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 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now