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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:53:17+00:00 2026-06-05T18:53:17+00:00

In my application I want to change the src value of iframe on click

  • 0

In my application I want to change the src value of iframe on click of radio button But when I try to do that I got error as:

ReferenceError: Left side of assignment is not a reference

Here is my html code as:

<div data-role="fieldcontain">
                <fieldset data-role="controlgroup" data-type="horizontal">

                    <input id="aaa" name="exch_type" type="radio" value="AAA" checked="checked"/>
                    <label for="aaa" style="width: 125px;">AAA</label>

                    <input id="bbb" name="exch_type" type="radio" value="BBB" />
                    <label for="bbb" style="width: 125px;">BBB</label>
                </fieldset>

            </div>                  

        </div>
        <div align="center">
            <iframe name = "chartId" id = "chartId" src="http://myDomain/chts/mobile.asp?Scrip=AAA&Exchange=XXX&ChartType=I&Hg=150&Wd=300" scrolling="yes"></iframe> 
        </div>

And click function as

$('input[name=exch_type]').change(function()
    {
        var radio_val = $('input[name=exch_type]:checked').val();

        if (radio_val=="AAA")
        {

            $("#chartId").attr("src") = "http://myDomain/charts/mobilechart.asp?Scrip=AAAIND&Exchange=NSE&ChartType=I&Hg=150&Wd=300";

        }

        else if (radio_val=="BBB")
        {

            $("#chartId").attr("src") = "http://myDomain/charts/mobilechart.asp?Scrip=BBBIND&Exchange=NSE&ChartType=I&Hg=150&Wd=300";
        }
        //alert('Radio Value: '+radio_val);
    });

Any help will be appreciated Thanks in advance

  • 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-05T18:53:18+00:00Added an answer on June 5, 2026 at 6:53 pm

    I’ve not tested but, note a bad assignment:

    $("#chartId").attr("src") = src="http://myDomain/chts/mobile.asp?Scrip=AAA&Exchange=XXX&ChartType=I&Hg=150&Wd=300";
    

    instead of:

    $("#chartId").attr("src", "http://myDomain/chts/mobile.asp?Scrip=AAA&Exchange=XXX&ChartType=I&Hg=150&Wd=300");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want change background datagird cell base on value in c# windows application. for
I want to change the font in my application to a custom font but
I want to change the application name that shows up in windows 7 taskbar
I want to change the logging level of an application (ruby). require 'logger' config
I want to change synchronously change in email application then automatic change in server
I want to change the app typeface and I can't: AndroidManifest.xml ... <application android:icon=@drawable/ic_launcher
I have an working application. Now I want to change the table names of
I had following cgridview in Yii application, I want to change date format in
I want to change the src attribute of an embed object. I have: <embed
I have an image that I want to use it's src attribute in relative

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.