Solved

Getting my iFrame+reload-button to JavaScript?

Posted on 2009-03-31
7
375 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
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…

911 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

20 Experts available now in Live!

Get 1:1 Help Now