0

I'm customising a UI for a piece of equipment that is purchased from a 3rd party.

By default the 'web manager' interface can only be customised to the extent of colours etc using an overriding style sheet.

However, I need to change a small piece of text. This text is loaded into a table via Javascript. The corresponding HTML page is literally just a couple of containers into which the JS loads the actual content and info from the device.

The piece of text I need to edit is in a table cell with an ID="status.Device.Name", so should be targetable, but I can't seem to grab it using via Firebug.

The content is present as such:

<tr>
 <td>Product Type:</td>
 <td id="status.Device.Name" colspan="2">TEXT TO BE REPLACED</td>
</tr>

Ive tried making the changes with:

$("#status.Device.Name").text("New Name");

or

$("#status.Device.Name").html("New Name");

Neither of these work. Any ideas what I should try?

To recap/clarify...

The text is located inside a table cell with a known id. The table and all data is loaded by some JavaScript from the device into the basic html page. Thus if I look at the source html of the active page, all I see is the basic html structure and none of the JS content.

Phill Healey
  • 3,084
  • 2
  • 33
  • 67
  • 2
    The selectors you described `$("#status.Device.Name")` target an element with the id status and the classes Device and Name, for example: `Old Name` Is this your intention? Your description otherwise does not mention any classes, thus my confusion. – jokr Mar 17 '14 at 10:22
  • @jomikr Unfortunately, that is the actual field id. Ive updated my question, and hopefully my situation is a little clearer. – Phill Healey Mar 17 '14 at 11:19
  • @Sari - I didn't realise the '.' was an issue until pointed it out. – Phill Healey Mar 17 '14 at 11:47
  • Just out of interest.... How can this be a duplicate if I don't know that the problem is down to an issue Ive never encountered bwefore???? Surely the solution is a duplicate rather than the question??!?!?!?! – Phill Healey Mar 17 '14 at 19:18

1 Answers1

0

Instead of:

$("#status.Device.Name").text("New Name");

Use this:

$("#status\\.Device\\.Name").text("New Name");

Reference here

Sari Alalem
  • 870
  • 7
  • 18