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 
         

adding function not showing the confrmation text via flash



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



Joined: 20 May 2006
Posts: 114
Location: Egypt
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


montanarry



Joined: 13 May 2006
Posts: 175
~apilookup setflash
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
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
montanarry



Joined: 13 May 2006
Posts: 175
Need to explain it more
Using ajax?
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
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
montanarry



Joined: 13 May 2006
Posts: 175
And the models are in svn also
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
No need to keep the data, as the entry was added
  Reply with quote
AmeliaR



Joined: 31 May 2006
Posts: 142
Peter Pitt, what about a JS alert?
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Peter Pitt, $this->redirect('/same/page');
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
I want to keep the use of javascript at the minimun
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Simple
And the setFlash method
  Reply with quote


Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
Call me stupid, but i couldn't figure out the setFlash
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Peter Pitt, did you look at the API?
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
Yep
  Reply with quote
montanarry



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



Joined: 20 May 2006
Posts: 114
Location: Egypt
Before the redirect, i suppose
Nope
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Yes Peter Pitt
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
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
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
montanarry



Joined: 13 May 2006
Posts: 175
User error
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
Yep
What's $_crumbs on htmlHelper?
It says that it is a public attribute and an array, but no more info on that
  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