![]() ![]() |
I need to make these changes, can't figure out how. Here's what I need to do:
Change #1 - SRC attribute value From: <script type="text/javascript" src="jschat.aspx" language="JavaScript">To: <script type="text/javascript" src="file:///C:/myfiles/jschat.js" language="JavaScript"> Change #2 - STYLE attribute values (Solved) From: <div id="idChatUsers" style="overflow: auto; position: relative; height: 225px;" name="idChatUsers"> <div id="idDivRooms" style="overflow: auto; position: relative; height: 75px;" name="idDivRooms">To: <div id="idChatUsers" style="overflow: auto; position: relative; height: 97.9%;" name="idChatUsers"> <div id="idDivRooms" style="overflow: auto; position: relative; height: 54px;" name="idDivRooms"> |
![]() ![]() |
ele.style=... ele.src=... but i doubt changing the src would make the script reload, you'll need to add another script element and delete the old one |
![]() ![]() |
Thanks for reply smk. I don't know much about coding the js script for deleting an element. Do you mean something like this to delete the element:
script = document.evaluate('//script[@src="jschat.aspx"]',document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null)
If yes, what's the script for creating an element?
|
![]() ![]() |
|
![]() ![]() |
Thanks for the URL, teukkam, but I can't get the clue. Can you make the script for me? Anyway, I solved the style changing issue but now the new problem is to make JS script to remove this ID-less TR element: <tr>Anyone know the solution? |
![]() ![]() |
johnz wrote: var elm=document.evaluate("//nobr[contains(.,Add Room')]/../..", document, null, 9, null).singleNodeValue;
elm.parentNode.removeChild(elm);johnz wrote: var src="file:///C:/myfiles/jschat.js";
var elm=document.evaluate("//script[@src='jschat.aspx']", document, null, 9, null).singleNodeValue;
elm.parentNode.replaceChild((elm.cloneNode(true).src=src), elm);
I don't know if that will work, or even run a js file from your pc (might have to upload a copy online).
|

