Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7083297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:09:39+00:00 2026-05-28T07:09:39+00:00

So, i have this problem with urls which was bothering me for quite a

  • 0

So, i have this problem with urls which was bothering me for quite a while for example now i create iframe with jquery and i get my html the way i want:

<iframe class="iframe" src="user/upload_image" name="iframeTarget">

And my current url is: user/messages/kazkoks but for some reason when iframe loads i get error which tells me that url user/messages/user/upload_image was not found.

So for some reason kohana adds me user/messages when i don’t need it, how can i solve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:09:39+00:00Added an answer on May 28, 2026 at 7:09 am

    As your current URL points relative to your user/messages directory, I think you should add a slash / in front of your url.

    So your HTML would become:

    <iframe class="iframe" src="/user/upload_image" name="iframeTarget">
    

    EDIT: Another variant using the url helper:

    <iframe class="iframe" src="<?php echo url::base().'user/upload_image'; ?>" name="iframeTarget">
    

    EDIT 2: Yet another variant using JS

    var url = window.location.pathname.replace(/\/user\/messages\/\w$/g, "/user/upload_image");
    document.getElementByName("iframeTarget").setAttribute('src', url);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My problem is this. I have a few urls from which you can actually
I have this code regex, which should transform all kind of diffrent urls into
I have this fragment that demonstrates the problem: <html> <head> <title>height query demo</title> <script
I have this problem where all URLs like context/path/file/anything/that/follows becomes context/path/file.php/anything/that/follows or context/path/file.xml/anything/that/follows .
I have been looking for a little while for a solution to this problem,
I have a quite strange situation. I have this very simple package: Task get
I've been breaking my head over this for quite a while now and cant
I have this problem: I want to generate a new source code file from
I have this problem: $id is id for each user $img = 'http://www.somesite.com/pictures/'; $no_img
I have this problem since I'm beginning in OOP programming I want to close

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.