Categories > TinyButStrong general >

urlencode to my ajax..

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: testebr
Date: 2006-05-01
Time: 18:31

urlencode to my ajax..

This:

urlencode($TBS->Show());

How to make the urlenconde to output?
By: testebr
Date: 2006-05-01
Time: 18:31

Re: urlencode to my ajax..

ps: the code above dont work

psĀ²: this board need an option to edit
By: Skrol29
Date: 2006-05-01
Time: 19:59

Re: urlencode to my ajax..

If you just want to UrlEncode some items in the template, it's better to use a custom function with parameter "onformat".
By: testebr
Date: 2006-05-01
Time: 22:32

Re: urlencode to my ajax..

Can you give me an example please?

I'm new in php
By: Skrol29
Date: 2006-05-01
Time: 22:59

Re: urlencode to my ajax..

HTML:
<a href="[var.x;onformat=f_uenc"]>

PHP:
function f_uenc($name,&$value,&$prm) {
  $value = urlenconde($value);
}
By: testebr
Date: 2006-05-02
Time: 12:39

Re: urlencode to my ajax..

Only for the vars? But and my template code, like text, css inline, etc.. I have problem with this.
By: Skrol29
Date: 2006-05-02
Time: 12:59

Re: urlencode to my ajax..

But if the URL is coded right clear in your template it's better to have it directly encoded.

There is an online tool at the following link:
http://www.blooberry.com/indexdot/html/topics/urlencoding.htm