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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:57:01+00:00 2026-06-11T03:57:01+00:00

i am using Javascript on my page. there is a problem when i use

  • 0

i am using Javascript on my page.
there is a problem when i use variable to send parameter to function,
when i write complete parameters directly as argument it works good like here

<script type="text/JavaScript">
        var X = new MediaController({ContainerDiv:"player",MediaUrl:"test.flv"}');
</script>

but as i use a temp to put this argument in it, and then use temp as argument function it does not work!

<script type="text/JavaScript">
    var temp;
       temp = '{ContainerDiv:"player",MediaUrl:"test.flv"}';
        var X = new MediaController(temp);
</script>

is there a point i missed?

  • 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-11T03:57:03+00:00Added an answer on June 11, 2026 at 3:57 am

    You are assigning a String to the temp variable, which isn’t the same as assigning the corresponding object. Instead of this

    temp = '{ContainerDiv:"player",MediaUrl:"test.flv"}';
    

    just do this:

    temp = {ContainerDiv:"player",MediaUrl:"test.flv"};
    

    and it should work the same.

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

Sidebar

Related Questions

Is there a way to access the page HTML source code using javascript? I
Is there a way (using javascript/jQuery) to do following: On my page, I have
I want to print a web page using JavaScript. But I do not want
Is it possible for a web page using Javascript to get data from another
Is it possible to get a browser's home page using Javascript? I'd like to
I want to add some style to head tag in html page using javascript.
I am using javascript to get the referring page (document.referrer) which works fine and
How to generate page numbers like the below using javascript/jquery? If the 5 th
How can I clear or refresh the page in the browser using javascript? I
I want to do some client side validation using javascript in ASP.NET page. I

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.