0

Okay I trying to make site handle different languages so I am using a resx file.

I can display simply Welcome on aspx page like this:

<asp:Label runat='server' ID="foo" meta:resourcekey='WelcomeText'/>

Now I want to be able to use javascript to do innerHTML:

"<div>
    <asp:Label runat='server' ID="foo" meta:resourcekey='WelcomeText'/>
</div>"

But it does not work like that. I have tried to also do getElementById which keeps returning null.

Any Ideas?

Beastwood
  • 458
  • 3
  • 18

1 Answers1

1

You can read like

var author = $('meta[name=author]').attr("content");

Is it possible to use jQuery to read meta tags

How to find and read metadata using jQuery (schema.org microformat)?

Community
  • 1
  • 1
Ajay2707
  • 5,345
  • 6
  • 34
  • 52
  • I think this is the right approach. But I am a little confused what exactly to put in the statement (here is what I have tried) var welcome = $('meta[name=WelcomeText]').attr("content") var welcome = $('meta[name=resourcekey]').attr("WelcomeText") – Beastwood Jun 18 '14 at 12:10