Loading ...

Help Related to InnerHTML

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  client side web development   » Help Related to InnerHTML

Help Related to InnerHTML

Posts under the topic: Help Related to InnerHTML

Posted: 7/21/2011

Lurker 10  points  Lurker
  • Joined on: 7/21/2011
  • Posts: 2

Hi All,

      I had attached the windows user control into the webpage using OBJECT tag. I had created the property named INDIA, when i try to access the userCtrl.innerHTML its giving a result like follwoing pattern

<param name = "I" Value="India"><param name ="A" value="Australia"><param name="b" value="brazil">

Now i want to the value INDIA alone. How to fecth this via javascript.

 

 


Posted: 7/21/2011

Guru 16773  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490

var myValue=$('param[name=I]').attr('Value');
alert(myValue);
Live: http://jsbin.com/ifebud


Posted: 7/22/2011

Lurker 10  points  Lurker
  • Joined on: 7/21/2011
  • Posts: 2

Hi Ragav,

<object id="uxCtrl" >   ->Embedde Windows User Control

 

If i put, uxCtrl.innerHTML,

its returning 

 <param name='I' Value='India'><param name='S' Value='Singapore'>

Have to fecth india only . How to do using JAVASCRIPT ? ?

 


Posted: 7/26/2011

Professional 8505  points  Professional
  • Joined on: 5/3/2010
  • Posts: 391

Hi SS SS,

Did you tried Raghav's example? It should work even if you don't have found the InnerHTML.
Another way would be this:

        $(function() {
            var vInnerHtml = $("#uxCtrl").find("param[name='I']").attr("Value");
            alert(vInnerHtml);            
        });

Try it and give us feedback.
Thanks,
Hajan 


Page 1 of 1 (4 items)