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

x
?
Solved

Getting my iFrame+reload-button to JavaScript?

Posted on 2009-03-31
7
Medium Priority
?
398 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 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
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

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