Just put your Javascript in the view file. You can either import an external
.js file or echo the javascript directly (I recommend the JsHelper for that).
-flosky
Justin Edwards schrieb:
There are many ways to handle that, and there are many javascript libraries
with different ways of doing
There are many ways to handle that, and there are many javascript libraries
with different ways of doing it. Unless you were using something like
http://banchaproject.org/ there is nothing cakephp has to do with it.
Here is my recommendation on learning javascript, the DOM, and events.
http://www.
On Oct 30, 10:18 am, arti grover wrote:
> thanks a lot..but plz considr this question
> I have made a function chat() in my users_controller and I want to add
> certain conditions like if a user cancels session before chat starts
> than a button should appear naming CANCEL_SESSION.but the moment
thanks a lot..but plz considr this question
I have made a function chat() in my users_controller and I want to add
certain conditions like if a user cancels session before chat starts
than a button should appear naming CANCEL_SESSION.but the moment
session starts that button should dissapear and an
This is not a CakePHP question. CakePHP is a PHP framework which
produces HTML, so anything you can do with HTML and javascript can be
done in CakePHP.
Go find a javascript tutorial that matches your requirements and give
it a go, you will feel better for being able to find the answer to
such a s
Hi all,
I want to call a javascript alert box the moment A user clicks on CANCEL
SESSION link.where should i put the javascript alert box in view and what
how to code that javascript function inside view??
--
Regards
Arti Grover
--
Our newest site for the community: CakePHP Video Tutorials
h
For this one you're going to be digging into
http://book.cakephp.org/view/1592/Js
You'll be able to use the JS Helpler to buffer() and write() to get
your javascript collected and sent out to your page. And/or you could
use Html Helper script() to load javascript files.
Probably you've written yo
I'm new to javascript and I'm trying to use
http://www.pengoworks.com/workshop/jquery/autocomplete.htm but I don't
understand the documentation.
I want to use http://code.google.com/p/searchable-behaviour-for-cakephp/
and the box I want the autocomplete to work its magic on is the
searchable searc
Try including the JSHelper in app_helper.php
On 25 Aug., 23:34, M wrote:
> javascript helper is used in default.ctp.
>
> when "Missing Controller", javascript is not loaded. i thought pages
> controller is reading 404.ctp so i copied it from cake/lib to app/
> controller and added Javascript help
javascript helper is used in default.ctp.
when "Missing Controller", javascript is not loaded. i thought pages
controller is reading 404.ctp so i copied it from cake/lib to app/
controller and added Javascript helper but it didn't work. i turned on
debug 2 and found the values passed to view from
I know, it sucks. I think I did manage to achieve a similar result in
a very roundabout way in one of my older applications, but it's not
really worth the hassle; Cake just isn't set up for it.
On Jun 8, 7:15 am, Dima wrote:
> My original implementation did exactly what you describe but I was
> h
My original implementation did exactly what you describe but I was
hoping that it could be done otherwise. Guess not.
Thanks,
Dima
On Jun 7, 8:12 pm, calvin wrote:
> You only use echo when you're linking them inline. So you would never
> have something like:
>
> echo $javascript->link($scriptna
You only use echo when you're linking them inline. So you would never
have something like:
echo $javascript->link($scriptname, false);
It would either be:
echo $javascript->link($scriptname);
or:
$javascript->link($scriptname, false);
Unfortunately, you can't use the $scripts_for_layout varia
vekija, thanks a ton for your help!! I added echo in front of all 4
of the lines in nav_menu.cpt. I was immediately able to see the style
sheets kick in; however, when I look at page source, it still doesn't
show those files in the page header and is not displaying correctly.
Am I using the corr
you have to "echo" those :)
echo $javascript->link('mootools-for-dropdown', false);
On Jun 7, 8:43 pm, Dima wrote:
> I'm pretty new to CakePHP so it is likely that my issue is rather
> simple to fix. I have a custom element which I created called
> nav_menu.cpt. I call this element from defaul
I'm pretty new to CakePHP so it is likely that my issue is rather
simple to fix. I have a custom element which I created called
nav_menu.cpt. I call this element from default.cpt using:
element('nav_menu'); ?>
For my element to work properly, I need to import 3x .js files and
1x .css file; I ha
I'm sorry I think you misunderstood my question
I am trying to figure out how to pass a javascript value from the page which
calls the ajax function.
I was able to do this by copying and pasting the javascript generated by the
CakePHP Ajax helper and modifying it, but I am looking for a way to do
On Fri, Nov 6, 2009 at 9:52 PM, Dave wrote:
>
> Hello all,
>
> I have a textbox that, onblur, needs to use ajax to call an action
> with its value as a parameter.
>
> now ideally this would be accomplished with
>
> onblue="remoteFunction(array('url'=>array
> ('controller'=>'ratings','action'=>'ra
You could make an AJAX call. Have your action render the element, then
insert the return content into the DOM.
On Mon, Sep 21, 2009 at 2:31 AM, mikeottinger wrote:
>
> Hi All,
>
> This is sort of an open question, I have a need to insert a section
> of a form into a page using
Hi All,
This is sort of an open question, I have a need to insert a section
of a form into a page using javascript. I'd like to leverage elements
for this. Basically, refer to the element from my javascript and have
the ability to replace variables in it. This is something Rails
sup
Sorry, I forgot to get back to you; I was in the middle of a crisis.
cake/../img/picturename.gif
That path doesn't look right. I think there's something deeper wrong.
And what about that in your view? Is it so, or is that actually
in your layout?
And, what I meant about rollovers is that, whe
Nevermind, I finally figured out the location of the images.
I set the 'address' of the alt pictures to:
cake/../img/picturename.gif
so it would have been:
element.src = cake/../img/picturename.gif
:)
--~--~-~--~~~---~--~~
You received this message because you
My original javascript code actually worked on a site (no setup with
cakephp). The problem I'm having is linking everything together. I
do appreciate the advice w/ the javascript though. :)
--~--~-~--~~~---~--~~
You received this message because you are subscribe
Thank you for your reply.
I don't fully understand your advice.
I understand that HtmlHelper will expect a relative path from webroot/
img, but if it is already in the 'img' folder, why would I need to
pass '/img/' + filename ? Will the javascript code look for the Hover
images in the img folde
You have a in your view? No the layout? Does the HTML source look right?
Anyway, your onHover function won't work because you're not passing
the full path to the image. Remember that HtmlHelper expectes a
relative path from webroot/img. However, you're only passing the
filename, instead of '/img
I assume you want only the relevant parts.
In my view I have:
Animal Tlatoque
link('evoicesindex'); ?>
css('evoices'); ?>
link($html->image('Library3Sized.gif', array
('alt'=>'Library', 'onmouseover'=>'onHover(this)',
'onmouseout'=>'onUnHover(this)')), arr
Hello Sarah,
Can you please paste the code here so that we can help you right a
way.
On Sun, Aug 9, 2009 at 9:38 PM, brian wrote:
>
> It could be a lot of things. Can you post your code?
>
> On Sat, Aug 8, 2009 at 9:32 PM, Sarah wrote:
> >
> > I'm having trouble getting my javascrip
Hello Sarah,
Can you please paste your code here so that we can help you right a way.
With out telling the pros & cons for that...
On Sun, Aug 9, 2009 at 9:38 PM, brian wrote:
>
> It could be a lot of things. Can you post your code?
>
> On Sat, Aug 8, 2009 at 9:32 PM
It could be a lot of things. Can you post your code?
On Sat, Aug 8, 2009 at 9:32 PM, Sarah wrote:
>
> I'm having trouble getting my javascript to work.
>
> The api recommends using link and putting the scripts and contents
> into the webroot/js folder. I tried this, but it isn't working.
>
> I'm
I'm having trouble getting my javascript to work.
The api recommends using link and putting the scripts and contents
into the webroot/js folder. I tried this, but it isn't working.
I'm trying to create a hover for an image...I included the functions
in the second parameter of $html->image().
I
I've 3 fields :
quantity | price | total
i wanna make this simple operation:
the total = quantity * price
how I can do it?
thank u..
On Sep 1, 5:15 pm, RichardAtHome <[EMAIL PROTECTED]> wrote:
> More info please :-)
>
> On Aug 31, 3:50 pm, assaggaf <[EMAIL PROTECTED]> wrote:
>
> > i wanna to
thank u very much
i have 3 inputs
first one is price , second is quantity last is total
i wanna perform this on total = price * total
that's all
i hope to explain in detail
thank u very much again
On Sep 1, 5:15 pm, RichardAtHome <[EMAIL PROTECTED]> wrote:
> More info please :-)
>
> On Au
More info please :-)
On Aug 31, 3:50 pm, assaggaf <[EMAIL PROTECTED]> wrote:
> i wanna to know how to make event for simple input
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post
i wanna to know how to make event for simple input
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this g
Erm, it seems like the $scripts_for_layout var is populated before the
elements are rendered so it doesn't contain the scripts which you add
it in an element.
My scenario:
/posts/view/123
and in view.ctp:
$this->element('456')
and in 456.ctp:
$javascript->link('somefile', false)
It doesn't wor
I have a subpage controller that has many categories and the
categories have many files. I want to be able to add a new input for
a file using javascript so the user creating the page can add as many
files a they need on the fly.
The category is generate on this page as well. So a user creates
; So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog:http://www.MarianoIglesias.com.ar
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de dizz
> Enviado el: Miércoles, 14 de Marzo de 2007 04:52 p.m.
> Par
Hello, how can you access the javascript helper using the static
pages? ie. PagesController
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroup
e
de dizz
Enviado el: Miércoles, 14 de Marzo de 2007 04:52 p.m.
Para: Cake PHP
Asunto: Using Javascript in Static Pages
Hello, how can you access the javascript helper using the static
pages? ie. PagesController
--~--~-~--~~~---~--~~
You received this message becau
hello
you can customize the flash to produce a js alert.
create a layout flash.ctp (copy the one in /cake/libs/view/templates/
layouts/flash.ctp)
instead of echo $message, put:
alert(''); //
str_replace to avoid ' (quote)
// and any javascr
I know... but I need to call a javascript function also in another
point of my code, always after the a data adding in my database and
after the checking in the controller.
I try to explain you better.
I have some objects, like dots, and when a user clicks on them a popup
(like that of google map)
On Feb 5, 4:39 pm, "Ilafra" <[EMAIL PROTECTED]> wrote:
> hi guys,
>
> I'd like to show a little pop-up in oder to inform the user that an
> operation (like "edit" or "add" data) has been correctly executed and
> to include in the pop-up an "Ok" button that redirects the user to the
> view that I
hi guys,
I'd like to show a little pop-up in oder to inform the user that an
operation (like "edit" or "add" data) has been correctly executed and
to include in the pop-up an "Ok" button that redirects the user to the
view that I wish.
I know that CAKE allows to this by the flash() method but it
thanks, that did the trick
bibek wrote:
> Hey, I did some debugging from firefox,
> well instead of going through document,firn,data[User][username].value
>
> how about doing this
> document.getElementById("UserUsername").value
>
> I hope that helps
> bibstha
> http://www.ioelive.com
--~--~---
[EMAIL PROTECTED] wrote:
> (using a php language thing here)
Oops. Ignore that. I wrote it out in english instead. The php
equivalent to your javscript would be something like
$form->data->{$User}->{$username}
--~--~-~--~~~---~--~~
You received this message beca
> i am trying to access that element in javascript using:
> form.data[User][username].value
Just FYI, "form.data[User][whatever]" won't work in javascript because
javascript sees the brackets as parts of javascript arrays. So, rather
than look for that as a string, it's trying to evaluate it as n
Hey, I did some debugging from firefox,
well instead of going through document,firn,data[User][username].value
how about doing this
document.getElementById("UserUsername").value
I hope that helps
bibstha
http://www.ioelive.com
--~--~-~--~~~---~--~~
You received
With scriptaculous, $('UserUsername').value (I think)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group,
ok so say i have part of a form generated using:
input('User/username', array('size' => 20)); ?>
which generates:
i am trying to access that element in javascript using:
form.data[User][username].value
and it is not working. i know the form variable holds the form as i
can get to other elem
49 matches
Mail list logo