Welcome Guest, Not a member yet? Register   Sign In
Doubt with url helper, message abour URI
#1

[eluser]Rubiz'[/eluser]
Hi there...

I used pop-up first time now, is this code:

Code:
<?
        $atts = array(
              'width'      => '417',
              'height'     => '650',
              'scrollbars' => 'no',
              'status'     => 'no',
              'resizable'  => 'no',
              'screenx'    => '0',
              'screeny'    => '0'
            );

        echo anchor_popup('pages/popEnviarAmigo/' . $noticia[0]->titulo, 'Enviar por e-mail!', $atts);
    ?>

Where "pages/popEnviarAmigo/" is the class name and the method name, this method is like:

Code:
function popEnviarAmigo($noticia)
    {
        $data['titulo'] = $noticia;
        $this->load->view('enviar_noticia', $data);
    }

The message returned is "The URI you submitted has disallowed characters."

This is question 1, the question 2 is: How can I attribute a CSS class to this anchor?
#2

[eluser]Rubiz'[/eluser]
No one could help?
#3

[eluser]andreagam[/eluser]
Quote: echo anchor_popup('pages/popEnviarAmigo/' . $noticia[0]->titulo, 'Enviar por e-mail!', $atts);

Probably $noticia[0]->titulo contains invalid characters for being passed in the url. You should escape it with url_title() (from (url_helper).
#4

[eluser]Rubiz'[/eluser]
hmm, well, I'm trying to pass a title that is like that: "title title title" its with several spaces...
I think a urlencode() should resolve..

About the class theres no way to attribute it in this array? I tried to put class in array it didint work..

Thanx!
#5

[eluser]Rubiz'[/eluser]
I see I'll have to copy paste generated html and use it, only because of the CSS I have to attribute...

ui ui...




Theme © iAndrew 2016 - Forum software by © MyBB