redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

function for not showing up the conform text via flash



 
Post new topic   Reply to topic    Web Design Forums -> PHP programming forum
View previous topic :: View next topic  
Author Message
montanarry



Joined: 13 May 2006
Posts: 175
How can i create an add function that doesn't show up the confirmation text via flash, but onto the same view?
  Reply with quote


Ikopar



Joined: 26 May 2006
Posts: 168
Just corrected the image
~apilookup setflash
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
No, i mean... like instead of loading a new page, it just shows a message on the view
In case that they want to add some more
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
Need to explain it more
Using ajax?
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Hmm... no
For example, on the tutorial
When you add a post, it sends you to a new page (via flash)
I would like to load the add view and show a confirmation message instead of the other page
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
And the models are in svn also
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
No need to keep the data, as the entry was added
  Reply with quote
BigDaddy



Joined: 26 May 2006
Posts: 147
montanarry, what about a JS alert?
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
montanarry, $this->redirect('/same/page');
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
I want to keep the use of javascript at the minimun
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
Simple
And the setFlash method
  Reply with quote


montanarry



Joined: 13 May 2006
Posts: 175
Call me stupid, but i couldn't figure out the setFlash
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
montanarry, did you look at the API?
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Yep
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
$this->Session->setFlash('Message to show when page is displayed again');
Did you create your own layout?
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Before the redirect, i suppose
Nope
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
Yes montanarry
If you create your own layout
You must have this line
Https://trac.cakephp.org/browser/trunk/cake/1.x.x.x/cake/libs/view/templates/layouts/default.thtml#L57
In it or the message to render
...for the...
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Ok... i'm getting a warning when trying to do validation
Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in C:\Program Files\xampp\htdocs\cake\cake\libs\model\model_php5.php on line 1458
Fixed, sorry
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
User error
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Yep
  Reply with quote
Page 1 of 1
Post new topic   Reply to topic    Web Design Forums -> PHP programming forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group