[Javascript] iframe question

Roger Roelofs rer at datacompusa.com
Thu Mar 18 08:02:15 CST 2004


Michael,

Do not walk, run over to <http://www.quirksmode.org/js/iframe.html>.  
All you seek is right there.

By the way, your javascript will work much better if you validate your 
pages.  Browsers respond to pages with errors in different ways, 
resulting in different internal DOM representations, which can result 
in unexpected javascript errors.

On Mar 18, 2004, at 8:30 AM, Michael Hanna wrote:

> OK, so I reference the iframe by its name? Where do I put the 
> javascript? in an onSubmit() function perhaps?
>
> Michael
>
> On 18-Mar-04, at 7:01 AM, Håkan Magnusson wrote:
> [cut]
>> On a sidenote; You could also simply do a location.reload(true) on 
>> the document in the iframe. By specifying true as a parameter for 
>> reload you will force the browser to make a new HTTP GET request, 
>> (hopefully) not using the cached version.
>>
>> Regards,
>> H
>>
>> David Lovering wrote:
>>> I would imagine simply setting the iframe's SRC attribute to null, 
>>> and then
>>> back to its original location.href would accomplish what you ask.  
>>> It would
>>> probably not be browser independent, since Mozilla/Netscape clones
>>> historically don't handle iframes well.
>>> -- Dave Lovering
>>> ----- Original Message ----- From: "Michael Hanna" <tao at spymac.com>
>>> To: "[JavaScript List]" <javascript at LaTech.edu>
>>> Sent: Thursday, March 18, 2004 4:29 AM
>>> Subject: [Javascript] iframe question
>>>> hi all, I'm new to this list and javascript. I do PHP scripting so I
>>>> have some fundamentals at least.
>>>>
>>>> my question is thus. I have a form to enter Events in an iframe. I 
>>>> want
>>>> to POST to PHP_SELF, so that the new Event appears later on in the
>>>> page/iframe.
>>>>
>>>> see
>>>>
>>>> http://www.siddha.ca/sites/3p94proto/
>>>>
>>>> here's the kicker: how do I also send information to the middle
>>>> iframe(which is a calendar view) to also reflect the change in the 
>>>> DB.
>>>>
>>>> The middle iframe needs to simply reload itself, just in case the 
>>>> event
>>>> appears in the calendar.
>>>>
>>>> Any suggestions?
>>>> Michael

Roger
-------------------------------------------------------
Roger Roelofs                 web   www.datacompusa.com
Datacomp Appraisal Services   web   www.mhvillage.com
3215 Eaglecrest Drive, NE     Email rer at datacompusa.com
Grand Rapids, MI  49525-4593




More information about the Javascript mailing list