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

  • Home
  • SEARCH
  • 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 8737513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:32:23+00:00 2026-06-13T10:32:23+00:00

I have an iframe on my page, where on click (a menu) will update

  • 0

I have an iframe on my page, where on click (a menu) will update the iframe with a new URL depending on what menuitem they select.

I do that by calling javascript function on ‘onclick’ passing the URL from the menu :

   function frameclick(pageurl)
     {
            $("#iFrame1").attr('src', pageurl);         
     }

What i would like to do whenever they press a menuitem is to store what iframe is loaded, because i have another button (select page language) and when they press that i want to reload the page but pass on the iframe-url that is currently displayed as a variable in the site url.

Since PHP is serverside and JS is clientside, i cannot do ex. “$current_iframe_url = pageurl” – which would have enabled me to pass it on as a variable on refresh.

You know how i could get around this ?

That works fine.

What i want to do now, is to whenever they click a menuitem i want to store that URL

  • 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-06-13T10:32:24+00:00Added an answer on June 13, 2026 at 10:32 am

    on every click create a hidden field save the value of url in a hidden field then only change the url. then after that you can simple submit the form using ajax .
    or when ever user clicks call an ajax function so that u can copy the url in database or session what ever you like.
    sample

    function frameclick(pageurl)
     {
       $.post("server.php", { url: pageurl } );
       $("#iFrame1").attr('src', pageurl);         
     }
    your php  server.php should do something like this
    
    
    if(isset($_POST['url']){
    //INSERT IN TO DB
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iframe on a page that I need to initially have a
I have a script that write a iframe into the page. I want to
I have few pages that I show from my main page inside iframe .
I have page with other asp.net page inside iframe. And on button click inside
I have a in an iframe, that calls a function from the parent page.
I have an iframe that loads a page inside it.. when a link is
I have a page in html (parent page) that have inside an iframe. When
Friends I have a Parent Page(default.aspx) that includes an iframe page(iframe.aspx) containing textbox in
Basically I have an IFRAME that displays a given page. I am using jQuery
I have Iframe on my page of another wesbsite. But when i click on

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.