• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

forms / multiple browsers problem

New Here ,
Jun 03, 2007 Jun 03, 2007

Copy link to clipboard

Copied

Hello all,

I'll try to explain my problem,

I have an application that uses cfc's as objects, the object knows if it is a new entry or not depending on the primary key
that is empty (= new one) or is not empty (= exists in the database)
So far so good, so, if i want to edit a record, the object is loaded with the data of that record with get and set methods

But, if i use multiple forms it goes wrong, meaning i can cross post...

Problem: I open a browser window and click to make a new record (= new empty object A)
I open an existing record in a NEW browser window to get some data from it ( to copy paste )
(= the cfc object A is loaded into the memory )
Then i copy paste some data to my first form and submit it, here it goes wrong,
because the application has the "existing edited record' still in memory it overwrites it

Any idea's how to prevent cross browser postings?

Regards,

NocTje









TOPICS
Advanced techniques

Views

227

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 05, 2007 Jun 05, 2007

Copy link to clipboard

Copied

LATEST
Sounds like you have a problem with your application structure. If you store your objects a session variables with the same name, it won't matter how many windows you open - you will be referencing the same object every time. I can think of 2 different possible solutions for this off the top of my head -

1) Name your objects differently in the session scope - that way you won't have a collision like this. Of course, you probably want to clear the objects out of memory when you are done with them, otherwise you could be looking at a lot of overhead

2) A better solution would be to come up with a method of serializing your objects (WDDX, JSON, etc) for passing data between form posts. That way, it would not matter how many windows you opened - your original object's information can be passed via 1 hidden field and then processed on your action page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation