Re: Using javascript

2011-10-30 Thread flo.kl...@googlemail.com
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

Re: Using javascript

2011-10-30 Thread Justin Edwards
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.

Re: Using javascript

2011-10-30 Thread AD7six
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

Re: Using javascript

2011-10-30 Thread arti grover
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

Re: Using javascript

2011-10-30 Thread WebbedIT
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

Using javascript

2011-10-29 Thread arti grover
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

Re: Autocomplete using javascript - newb question

2011-05-20 Thread dreamingmind
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

Autocomplete using javascript - newb question

2011-05-20 Thread MeatSandwich
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

Re: using javascript helper on 404

2010-08-26 Thread ohcibi
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

using javascript helper on 404

2010-08-25 Thread M
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

Re: Using Javascript->link Inside An Element

2010-06-08 Thread calvin
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

Re: Using Javascript->link Inside An Element

2010-06-08 Thread Dima
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

Re: Using Javascript->link Inside An Element

2010-06-07 Thread calvin
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

Re: Using Javascript->link Inside An Element

2010-06-07 Thread Dima
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

Re: Using Javascript->link Inside An Element

2010-06-07 Thread vekija
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

Using Javascript->link Inside An Element

2010-06-07 Thread Dima
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

Re: using javascript within $ajax->remoteFunction

2009-11-07 Thread David Roda
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

Re: using javascript within $ajax->remoteFunction

2009-11-07 Thread Marcelo Andrade
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

Re: insert elements using javascript

2009-09-21 Thread brian
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

insert elements using javascript

2009-09-20 Thread mikeottinger
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

Re: Using Javascript link

2009-08-12 Thread brian
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

Re: Using Javascript link

2009-08-12 Thread Sarah
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

Re: Using Javascript link

2009-08-11 Thread Sarah
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

Re: Using Javascript link

2009-08-10 Thread Sarah
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

Re: Using Javascript link

2009-08-09 Thread brian
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

Re: Using Javascript link

2009-08-09 Thread Sarah
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

Re: Using Javascript link

2009-08-09 Thread Vijay Kumbhar
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

Re: Using Javascript link

2009-08-09 Thread Vijay Kumbhar
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

Re: Using Javascript link

2009-08-09 Thread brian
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

Using Javascript link

2009-08-08 Thread Sarah
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

Re: using javascript with form element

2008-09-02 Thread assaggaf
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

Re: using javascript with form element

2008-09-02 Thread assaggaf
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

Re: using javascript with form element

2008-09-01 Thread RichardAtHome
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

using javascript with form element

2008-08-31 Thread assaggaf
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

Using $javascript->link('somefile', false) in an element doesn't work

2008-05-28 Thread dericknwq
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

Adding new input/file fields using javascript, submitting them all at once

2007-10-06 Thread benr
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

Re: Using Javascript in Static Pages

2007-03-14 Thread dizz
; 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

Using Javascript in Static Pages

2007-03-14 Thread dizz
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

RE: Using Javascript in Static Pages

2007-03-14 Thread Mariano Iglesias
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

Re: showing an alert message using javascript

2007-02-06 Thread djiize
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

Re: showing an alert message using javascript

2007-02-06 Thread Ilafra
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)

Re: showing an alert message using javascript

2007-02-05 Thread AD7six
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

showing an alert message using javascript

2007-02-05 Thread Ilafra
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

Re: using javascript to access form elements?

2006-06-23 Thread SEPHROTH64
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 --~--~---

Re: using javascript to access form elements?

2006-06-23 Thread [EMAIL PROTECTED]
[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

Re: using javascript to access form elements?

2006-06-23 Thread [EMAIL PROTECTED]
> 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

Re: using javascript to access form elements?

2006-06-22 Thread bibek
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

Re: using javascript to access form elements?

2006-06-22 Thread RosSoft
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,

using javascript to access form elements?

2006-06-22 Thread SEPHROTH64
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