Jump to content

This topic is 7909 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have an html page that has an inline action in it. I then have a link for each of the records in the inline action to delete the record using the records' -RecID. The -format is the current page the inline action is in. The thing that I notice is that when I try to delete the record, the record actually gets deleted but the record is still shown in the html page.

However when I create a new record and the format page is the current page as well (since it contains the inline that displays the record), the html page actually shows newly added record.

Does anyone know as to why when deleting a record, the page doesn't seem to refresh with the proper content? It seems that the page is cached for some reason when deleting.

The only solution that I seem to have is to go to a -format page that has a onLoad that submits a new form request that is the same request that was needed to get to the current page with the inline action.

Thanks.

Posted

Leb,

Refresh the page? Doesn't the page already get refreshed when the form is submitted.

Here is an idea of what html code that is generated by the InlineAction:

<table border="0" cellpadding="0" cellspacing="0">

<tr><td><a href="javascript: deleteThisRecord(12)">Foobar</a></td></tr>

<tr><td><a href="javascript: deleteThisRecord(13)">Wysiwyg</a></td></tr>

.

.

</table>

and deleteThisRecord is simply:

function deleteThisRecord(current_recid) {

document.deleteJobTitlesForm.elements["-RecID"].value = current_recid;

document.deleteJobTitlesForm.submit();

}

deleteJobTitlesForm is a form defined as:

<form name="deleteJobTitlesForm" method="post" action="FMPro">

<input type="hidden" name="-RecID" value="">

<input type="hidden" name="-db" value="JobTitles_">

<input type="hidden" name="-format" value="listing.html"> <!-- listing is the current page as well ->

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

<input type=hidden..... rest of the hidden arguments ....

</form>

As I said, the record gets deleted in the database but the page doesn't seem to update or refresh. It is either a caching issue or some kinda delay is needed...not sure...

I'm just wondering as to why when creating a new record in an inline, the inline shows it fine but deleting a record in the inline doesn't reflect.

Thanks

Posted

hi Mac!

I have not looked at your code/page but here is another concept (not putting anyone down just trying to break it a_part) u might look into:

start.html---- submit --->delete/inline/action.html---refresh and redirect to-->Results.html

or

on your delete/inline/action.html page set the refresh rate to 1 sec or so

and use the [FMP-IF] statement so :

if the record is truly deleted and u try to refresh(whihc is essentially delete again with the inline) you can capture the error (still on the same page) that ur "trying to delete the record that does not exist" and display confirmation

to the user.

what do u think?

All the best!

This topic is 7909 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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