samedi 9 mai 2015

when click link, page redirects to the source from the target page iframe

Im using Laravel 5 and i created a page that have an iframe but whenever I click the link that jump into that page (the page that has an iframe) it redirects me to link that the iframe source has (refer below)

this is the link to the page that has an iframe

<a href="{{ url('/webmail') }}">To the webmail page with an iframe</a>

and this is the iframe in the webmail page

<iframe src="http://ift.tt/1EmOcIT" scrolling="no"></iframe>

whenever I click the link, it redirect me to "http://ift.tt/1EmOcIT" instead of jumping to the webmail page like "http://ift.tt/1EmOcIV.

How to prevent the page from redirecting yet all stuff must working with the iframe (like I can click or any normal actions to the site that has been loaded through the iframe)?

update:

heres my route and controller code (refer below)

route::get("webmail", "mot@webmail");

and in my controller

public function webmail(){
    $data = branch::all();
    $breadcrumbs = '<li><a href="' . $this->url->to('/webmail') . '">webmail</a></li>';
    $activelink = "webmail";
return view('pages.webmail', compact('breadcrumbs', 'activelink', 'data')); 
}

everything works in my local like no redirects occured but when I put my development to a live host, it redirects me.

Aucun commentaire:

Enregistrer un commentaire