Jump to content


- - - - -

Loosing my variable and loosing my mind I think


  • You cannot reply to this topic
2 replies to this topic

#1 PaulD

    Likes Etomite Forums!

  • Developers
  • PipPip
  • 398 posts
  • Gender:Male

Posted 16 February 2008 - 03:52 AM

I put this in general chatter because it is probably tooooo vague and complicated BUT..... :Frustrated:

I have a controller that calls the page if allowed.

It lists some data from a snippet

It also calls an Ajax based set of tabs for navigational stuff and forms, one is ADD, one is EDIT.

The data that can be edited has a link on it, that tells the ajax tabs to load a form, with an id passed to it. That form then looks up the id and gets the data to put into the form for editing.

But, somewhere along the way, the id passed in the variable is being lost. It is when the ajax tabs load the page, which runs a snippet, based on the id sent to the ajax tabs in the first place.

God, when you start making stuff up on the fly and get away from the original plan, everything gets sooooo complicated.

So I could load the user database with the id, then collect it again from the snippet that runs to provide the form for the ajax tabs. (I am only trying to keep it in the ajax tabs for neatness - perhaps I should think of another way to do it entirely :-(

I think that is the answer actually :-(. But seems excessive just to Edit.

THe problem is, the ajax tabs won't pass the variable on that was sent to it by another part of the page, when the page is loading on a different set of variables.

mmmm.

Thinking about this, I suppose $_Request can only have one set of requests stored in it.

I don't know. Perhaps I should sleep on it.

Paul.

#2 PaulD

    Likes Etomite Forums!

  • Developers
  • PipPip
  • 398 posts
  • Gender:Male

Posted 16 February 2008 - 04:03 AM

Ha ha !!!! It works!!!!

The only thing I had not done is to pass the table name as well. Given the hassle I have just hardcoded it in for now ($table="whatever";), but it works and it is beautiful!!!!!!!

I LOVE Etomite!

xxx

#3 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 16 February 2008 - 10:40 AM

Isn't it surprising what you can do in the early hours of the morning :D

Glad you got it sorted ;)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users