Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

iframe and safari 1.0 v85

Featured Replies

Thanks to gary i have been able to set up a HTML using iframe to create multiple records in one instance. This used to work fine when using the beta release of safari. Now that Apple has upgraded safari for beta to version 1.0, iframes do not appear to work anymore.

Three topics i want too raise:

1]Has anyone enccountered problems with FM, CDML, Safari and iframes

2]Are their more generally adapted browsers that do no support iframes

3] in case of yes to Question two B) is their an easy way round to avoid using iframes but still being able to create multiple records without refreshing the HTML page ?

The reason for my question is that i have come a long way in building my application, now with this iframe issues i feel leek i am in the middle of the stone ages again with my app. The other problem is that i am developing my app on a Mac.

Thanks for any suggestions

Jitse

  • Author

So, id did further experimenting with bot safari and IE 5.2.3.

As said before: safari creates new windows when submitting a form to an iframe.

Now with IE 5.2.3 it does not work either.

This is what is happening:

i have made a HTML page (newproject.htm) that contains two submit calls, one form and some iframes:

The submit part

document.forms[2].submit()

alert("ready")

delayMS()

document.forms[2].submit()

The form part<form action="FMPro" method="post" name="controls3" target="frame2">

<input type="hidden" name="-db" value="Projectmedewerkers.fp5">

<input type="hidden" name="-lay" value="L1">

<input type="hidden" name="-format" value="newproject.htm">

<input type="hidden" name="-error" value="newproject.htm">

<input type="hidden" name="ProjectId" value=[FMP-CurrentToken:5]>

<input type="hidden" name="PersId" value=[FMP-CurrentToken:5]>

<input type="hidden" name="uurtarief" value=[FMP-CurrentToken:5]>

<input type="hidden" name="verkooptarief" value=[FMP-CurrentToken:5]>

<input type="hidden" name="Urenbudget" value = "0">

<input type="hidden" name="-New">

</form>

and the iframes:

<iframe name="frame1" id="1" src="empty.htm"></iframe>

<iframe name="frame2" id="2" src="empty.htm"></iframe>

<iframe name="frame3" id="3" src="empty.htm" ></iframe>

<iframe name="frame4" id="4" src="empty.htm"></iframe>

Now the first submit does create a new record.

However: the resulting pages can be seen in the iframe !!

And the second submit is never called.

I am stuck,

can someone show the a working normal frame exeample?

Thanks Jitse

Maybe, you can try <div> tags, e.g.B)

<div id="frame1"></div>

I'm travelling at the moment and do not have a chance to experiment. Next wekk I will be back in the office.

All the best.

Garry

  • Author

Thanks, for the respond

I was about to put in the subject B) Gary/Anatoli/other smart guys i need you badly. <smile>

Today i will do some more experimenting including your option.

Keep you posted on this one

Travel savely

Jitse

  • Author

So i stripped down the code to this B)

<SCRIPT LANGUAGE=javascript>

function createproject(){

document.forms[0].submit()

alert("test")

document.forms[0].submit()

}

</SCRIPT>

<input type="image" SRC="btn_send_on.gif" onclick="createproject()">

<form action="FMPro" method="post" name="controls3" target="frame1">

<input type="hidden" name="-db" value="test.fp5">

<input type="hidden" name="-lay" value="L1">

<input type="hidden" name="-format" value="testpage.htm">

<input type="hidden" name="-error" value="testpage.htm">

<input type="hidden" name="-New">

</form>

</CENTER>

<iframe name="frame1" id="1" height="0" width="0"></iframe>

How it should work : two records created and no update of the (parent) window nor creation of new window.

These are the results:

Safari create a new empty page after the first submit, it only creates one record.

Mozilla does create two records, no additional windows created.

IE on mac : one record created, no additional window created !!!!!

Internet explorer on windows platform creates two record, no addiotional windows created

Why does safari create two windows and creates only one record

(* i am using FM 5.5 on OS 9.2.2 *)

Any researchers out there ?

Thanks Jitse

  • Author

I wish i could make money with experimenting:

In case of mozilla (OS X) and i replace the alert with a timedelay (10 secs), only one record is created !!!!!

So i need the alert to tell filemaker to create a record.

Very strange behaviour.

Jitse

  • Author

OK, i am completely lost.

Please check the code in theis message.

I duplicated the form (they both create a new record in the same iframe)

I have done some parameter analyses

scenario 1 B)

document.forms[0].submit()

delayMS()

document.forms[0].submit()

delayMS()

document.forms[0].submit()

Only one record created

scenarion 2

document.forms[0].submit()

delayMS()

document.forms[1].submit()

delayMS()

document.forms[0].submit()

Three records created !!!!!

What does this mean :

Jitse

<SCRIPT LANGUAGE=javascript>

function delayMS()

{

var localtime= new Date()

var localtimeMS=localtime.getTime()

var timedelayMS=localtimeMS+400

var currenttime=new Date()

var currenttimeMS=currenttime.getTime()

while (currenttimeMS<timedelayMS)

{

currenttime=new Date()

currenttimeMS=currenttime.getTime()

}

}

function createproject(){

document.forms[0].submit()

delayMS()

document.forms[0].submit()

delayMS()

document.forms[0].submit()

}

</SCRIPT>

<input type="image" SRC="btn_send_on.gif" onclick="createproject()">

<form action="FMPro" method="post" name="controls3" target="frame1">

<input type="hidden" name="-db" value="test.fp5">

<input type="hidden" name="-lay" value="L1">

<input type="hidden" name="-format" value="testpage.htm">

<input type="hidden" name="-error" value="testpage.htm">

<input type="hidden" name="-New">

</form>

<form action="FMPro" method="post" name="controls4" target="frame1">

<input type="hidden" name="-db" value="test.fp5">

<input type="hidden" name="-lay" value="L1">

<input type="hidden" name="-format" value="testpage.htm">

<input type="hidden" name="-error" value="testpage.htm">

<input type="hidden" name="-New">

</form>

  • Author

I am going to catch up with gary !!

This code creates two records as it should B)

function createproject(){

document.forms[0].target="frame1"

document.forms[0].submit()

delayMS()

document.forms[0].target="frame1"

document.forms[0].submit()

}

so by telling the form what frame to target to it seems to work (at least mozilla, safari still creates a new window )

Jitse

target="frame1"

target thing:

========================================================================

_blank opens the linked document in a new browser window, leaving the current window untouched.

_parent opens the linked document in the parent frameset of the frame the link appears in, replacing the entire frameset.

_self opens the link in the current frame, replacing the content in that frame.

_top opens the linked document in the current browser window, replacing all frames.

Tip: If you

  • Author

Thanks for your respond. However one of the issues is why the submits after each other do not work unless you actually provided the target with a javascript statement instead of "hardcode".

In addition could you provide me with a sample code that shows me how to submit a form using frameset and frames.

For example, how should the previous simple example be build using frames?

Thanks

Jitse

hm ...how about changing:

<input type="image" SRC="btn_send_on.gif" onclick="createproject()">

<form action="FMPro" method="post" name="controls3" target="frame1">

into:

<form action="FMPro" method="post" name="controls3" target="_blank" onSubmit="createproject();">

....

..

<input name="Submit" type="image" value="Submit" src="btn_send_on.gif" width="45" height="20">

All the best!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.