[jQuery] Re: prompt before closing dialog

2009-12-17 Thread Obi1
OK, it's working fine. thank you for the indications.


[jQuery] Re: prompt before closing dialog

2009-12-17 Thread Obi1
it doesn't work for me as i'm using jConfirm not javascript confirm
but it will have to do while i don't find a solution.

Thanks


[jQuery] Re: prompt before closing dialog

2009-12-17 Thread Obi1
this doesn't seem to work, i mean the prompt appears but only after
dialog is closed;
also tryed using the beforeclose event but the prompt doesn't even
show.


[jQuery] prompt before closing dialog

2009-12-17 Thread Obi1
Hi, i'm having some trouble because i'm using a dialog witch has a
form in it where someone can change info about their hotel. this
dialog also has 2 buttons one to close and the other to save changes.
what i'm trying to accomplish is - when someone made sany change and
tries to close de dialog without saving he will be prompt if he really
wants to leave without saving the changes an the dialog only closes if
person choses 'yes'.

when closing the window clicking the 'close' button i can accomplish
this, but i wanted it also to work when closing dialog using the "x"
button on the top of the dialog.

is this possible?


[jQuery] Re: $.getJSON() Special Chars

2009-06-17 Thread Obi1

Ok, solved the problem using htmlentities() in all variables before
assingnig them to smarty.


[jQuery] Re: $.getJSON() Special Chars

2009-06-17 Thread Obi1

everything is set to use utf-8.
though i've notice now, first time i call the getJSON, on $
(document).ready, the response comes fine, with the right chars.
the problem happens whe i click a button that calls the method again,
witch is meant to perform a search.

On 16 Jun, 19:23, James  wrote:
> Make sure the page your Javascript is on is also also uses utf-8
> content-type (e.g. in meta tags). Same for your PHP script.
>
> On Jun 16, 1:45 am, Obi1  wrote:
>
>
>
> > Hi,
>
> > I'am having a bit of a problem with special chars in a getJSON
> > response which is the result from php and smarty
>
> > the file called by the getJSON is something like this:
> >  >    $callback = $_REQUEST["callback"];
> >    {...}
> >       Getting data from a wsdl using nusoap.
> >    {...}
> >    $smarty = new Smarty;
> >    $smarty->compile_check = true;
> >    $smarty->debugging = false;
> >    $smarty->template_dir = $CFG->smartydirs . "/templates";
> >    $smarty->compile_dir = $CFG->smartydirs . "/templates_c";
> >    $smarty->config_dir = $CFG->smartydirs . "/configs";
> >    {...}
> >       assigning vars etc...
> >    {...}
> >    $html = $smarty->fetch("alojamentos/resultadoPesquisa.tpl");
>
> >    $resposta = array(
> >       "html"=>utf8_encode($html)
> >    );
>
> >    echo $callback . '('. json_encode($resposta) . ')';
> > ?>
>
> > some of the vars and text used in the smarty output as accents,
> > ceddils, etc the problem is when i replace a div's innerHTML for the
> > one on json.html those special chars appear like squares or chinese
> > chars.
> > how can this be fixed?- Ocultar texto citado -
>
> - Mostrar texto citado -


[jQuery] $.getJSON() Special Chars

2009-06-16 Thread Obi1

Hi,

I'am having a bit of a problem with special chars in a getJSON
response which is the result from php and smarty

the file called by the getJSON is something like this:
compile_check = true;
   $smarty->debugging = false;
   $smarty->template_dir = $CFG->smartydirs . "/templates";
   $smarty->compile_dir = $CFG->smartydirs . "/templates_c";
   $smarty->config_dir = $CFG->smartydirs . "/configs";
   {...}
  assigning vars etc...
   {...}
   $html = $smarty->fetch("alojamentos/resultadoPesquisa.tpl");

   $resposta = array(
  "html"=>utf8_encode($html)
   );

   echo $callback . '('. json_encode($resposta) . ')';
?>

some of the vars and text used in the smarty output as accents,
ceddils, etc the problem is when i replace a div's innerHTML for the
one on json.html those special chars appear like squares or chinese
chars.
how can this be fixed?