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 8754129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:33:43+00:00 2026-06-13T13:33:43+00:00

The code I want to run upon triggeting the redirect, is to go to

  • 0

The code I want to run upon triggeting the redirect, is to go to another web page (or local html file, either is possible in this situation), however pass some javascript to run on that page, as that page works off embeding content in Iframes. This needs to be done to allow me to specify the content in the iframe upon redirect.

To put it simpler. How can I make it so when you go to website.com/about/, it redirects to website.com/ with the content for /about/ loaded in an iframe?

<head>
    <title> CodeBundle </title>
    <script>
        function home() {document.getElementById("loadedpage").src="home.html";}
        function about() {document.getElementById("loadedpage").src="about.html";}
        function reviews() {document.getElementById("loadedpage").src="reviews.html";}
        function tutorials() {document.getElementById("loadedpage").src="tutorials.html";}
        function blog() {document.getElementById("loadedpage").src="blog.html";}
</script>
</head>
<body>
    <header>
        <br><hr><font size=27><a onClick="home();">Code Bundle</a></font><br><hr>
        <div ALIGN=RIGHT>
            <font size=6> | <a onClick="about();">About</a> | <a     onClick="reviews();">Reviews</a> | <a onClick="tutorials();">Tutorials</a> | <a onClick="blog();">Blog<a> |</font> <hr>
        </div>
        <iframe id="loadedpage" src=home.html width=100% height=100% frameborder=0>Iframe Failed to Load</iframe>
    </header>
</body>
</body>    

this is my index.html for website.com/

I want to write a page so that when you go to website.com/about/ it redirects to website.com/ running the javascript function about(), so as to display the about page.

  • 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-13T13:33:44+00:00Added an answer on June 13, 2026 at 1:33 pm

    You will have to either pass some data using a query parameter or a fragment identifier.

    See:

    • http://en.wikipedia.org/wiki/Query_string
    • http://en.wikipedia.org/wiki/Fragment_identifier

    In either case you will have something present in the url and it will look like:

    http://www.example.com/?page=about
    

    or:

    http://www.example.com/#about
    

    or – this would be best:

    http://www.example.com/#!/about
    

    because it could let you make the website crawlable. See:

    • Making AJAX Applications Crawlable

    Now after reading your comment to the answer by theredled that you “add new content regularly and loading that in embeded iframes is quicker than writing new html every time” I have to ask this: aren’t you using a templating system in your website?

    Keep in mind that making AJAX-loaded content and using fragment identifiers to display the right content is not done because the page creation is easier (it isn’t) but because the user experience is faster and more responsive. See for example the website for the SoundJS library:

    • http://www.createjs.com/#!/SoundJS

    When you click the link to PreloadJS at the top you go to:

    • http://www.createjs.com/#!/PreloadJS

    The content is reloaded, the address bar changes, but the page is actually not reloaded. (You can see that it is properly crawlable because it shows in the results if you google for ReloadJS.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code I want to run, but the problem is $this->type
Why this code don't work,when i want run this code vwd 2008 express show
I want to run the following jquery code on every page in my website.
I have code, which i want to run, this takes a few mins so
I want to run three php scripts one after another from one file. all
I want code to run whenever I create a new object. For example, see
I want to run code which needs boost libraries. I built it using CMake.
I want to run Prolog code using Java. I found some engines, but the
I want to run a Maven compilation by my Java code. Thus, I've used
I want to run Protovis javascript from Java and get the evaluated SVG code.

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.