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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:40:32+00:00 2026-05-27T19:40:32+00:00

how to write javascript variable in iframe src? Like <iframe id=showskill scrolling=yes height=350 width

  • 0

how to write javascript variable in iframe src?

Like

<iframe id="showskill" scrolling="yes" height="350" width ="350" src="http://localhost/POSkill/skillshow.aspx?user_id="+ ReturnURL() ></iframe>

Here ReturnURL() is a javascript function which returns a value. But the problem is in the iframe source I’m not getting the returned value of the function. Am I not putting in the right format or missing something?

Thanks in advance
Johnny

  • 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-27T19:40:33+00:00Added an answer on May 27, 2026 at 7:40 pm

    You can’t use JavaScript variables or functions directly within your html markup in that manner. What you can do is define your iframe first and then set its source from JavaScript:

    <iframe id="showskill" scrolling="yes" height="350" width ="350" src=""></iframe>
    
    <script>
        document.getElementById("showskill").src =
                  "http://localhost/POSkill/skillshow.aspx?user_id="+ ReturnURL();
    </script>
    

    There are several other ways to achieve something similar, but I don’t really want to go through them all when I’m not sure quite what your context is.

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

Sidebar

Related Questions

How do I write a Javascript function that accepts a variable number of parameters,
I have problem with variable printing inside javascript. variable htmlString printing not working: document.write(htmlString)
I´d like to pass a javascript variable to php and I thought of using
I have an ActiveX HTML Object as defined here: <object id=HSMBTPrintX1 width=350 height=350 classid=CLSID:68d05400-18a6-4b39-b3ff-a17d77c1eddf
I tend to write my javascript as big blocks of code without many variable
In Javascript, I can write: var circles = document.all.tags(circle); and in circles variable I
I'm trying to write javascript to find page elements relative to a given element
I'm looking for way to write Javascript programs / scripts on desktop, not inside
Can anyone tell me how to write javascript code that removes everything after the
Is there any other way to write javascript:false that is more pleasant? I'm building

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.