FIXED IT!
There was another div in the way. Thanks for the help!
User Profile
Collapse
-
Ooops, meant to correct that. When I try to run the script, I keep getting a DOM Exception 8 error. Which I believe is the same as the FF error of not being able to find the node.
That doesn't make sense though, if I can use alert() and see that both of them come up with an object, shouldn't it work fine? I just can't seem to find what's causing the error.
I thought maybe having the same id (which they do need to have,...Leave a comment:
-
Problem with replaceChild()
First, here is the code.
Code:function swapMP (theMPvalue) { if (theMPvalue !== "custom") { return; } var customMP = document.getElementById("part_mp"); var newCustomMP = document.createElement("input"); var thePartPopup = document.getElementById("partPopup"); newCustomMP.setAttribute("id", "part_mp");
-
Code:totalHDspace.innerHTML = parseInt(totalHDspace.innerHTML) + parseInt(sz)
Thanks for the help!Leave a comment:
-
Well, it's part of a larger script, so I'll put the relevant parts.
[CODE=javascript]function updatePart (hd, sz, dispType) {
var totalHDspace = document.getEle mentById(hd + '-total');
//var totalHDspaceUp = document.getEle mentById(hd + '-total');
switch (dispType) {
case "update":
totalHDspaceUp. innerHTML = parseInt(totalH DspaceUp.innerH TML) + sz;
break;
...Leave a comment:
-
Thanks for the reply.
I've tried that, and for some reason it combines them like they are both strings.
[CODE=javascript]var sz = 123;
//theValue.innerH TML = 0;
theValue.innerH TML = parseInt(theVal ue.innerHTML) + sz;[/CODE]
So when it combines the two, it outputs "0123" rather than just "123" and it's the same when you try to do it again and add, say 10, it will spit out...Leave a comment:
-
String to number conversion
I've got a number set up in my document like this
Code:<span id="anID">0</span>
Code:var theValue = document.getElementById("anID"); theValue.innerHTML = theValue.innerHTML + 10;
-
Sure...
[CODE=html]<table id="hdpart-1">
<tbody>
<tr id="hdpart-1/1234">
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
<td>Cell 4</td>
<td>Cell 5</td>
<td>Cell 6</td>
<td>Cell 7</td>
<td>Cell 8</td>...Leave a comment:
-
JS works in Safari, but not FF - DOM error
I've got a problem with a script that is working perfectly in Safari, but won't work in FF. The error it spits out is
Here is the function I'm trying to call...
[CODE=javascript]function deletePartition (aPartID, partHDrive) {
var oldPartHD = document.getEle mentById(partHD rive);
var oldPartition = document.getEle mentById(aPartI D);
oldPartHD.tBodi es[0].removeChild(ol dPartition);... -
Handling an AJAX response
Hey, I'm looking to handle an XML response depending on what's sent. Better than I can explain it, here's an example...
[CODE=javascript]function stateChanged () {
if (xmlHttp.readyS tate == 4) {
var xmlDoc = xmlHttp.respons eXML;
if (xmlDoc.getElem entsByTagName(" error")) {
alert('error');
}
}
}[/CODE]
Alright, the response will be either all... -
Awesome, that got it! I had to rearrange somet things and it's not as pretty as I'd hoped... but it works now, so that's all that matters. Thanks a lot!Leave a comment:
-
Sorry, I was in a hurry and just didn't think about the title.
I tried changing it over to that, but I still get an "Value undefined (result of expression theTableRow.get ElementsByTagNa me) is not an object" error.
[CODE=javascript]var theTable = document.getEle mentById("hdpar t-" + (x+1));
var theTableRow = theTable.tBodie s[0].getElementsByT agName("tr");
var theTableCell...Leave a comment:
-
Locating a TD inside of a TR.
This is really simple, I almost feel bad for posting it.
[CODE=javascript]var theTable = document.getEle mentById("hdpar t-" + (x+1));
var theTableCell = theTable.tBodie s[0].getElementsByT agName("td");
var theTableRow = theTable.tBodie s[0].getElementsByT agName("tr");[/CODE]
instead of theTableCell pointing to every <td> tag in the table, I need it to only return the... -
OH WOW! I cannot believe I missed that, I know better than that. Haha, thanks! I've been trying to figure that out for 3 days now.Leave a comment:
-
BAH! Yes, I am sorry. Each row does have an id of 'nopart'. Sorry, I completely forgot.Leave a comment:
-
Sure, it's pretty simple.
Code:<table id="hdpart-1"> <tbody> <tr> <td colspan="9">Remove Me</td> </tr> </tbody> </table> <table id="hdpart-2"> <tbody> <tr> <td colspan="9">Remove Me</td> </tr> </tbody>
Leave a comment:
-
DOM exception 8
Alright, I've had this problem for a while, but haven't been able to figure out what's causing it. After searching forever looking through manuals and such, I think I found the answer though I don't know how to solve it.
First, here is the code:
[CODE=javascript]var thetable = document.getEle mentById(theHd) ;
var oldrow = document.getEle mentById('nopar t');
if (oldrow) {thetable.tBodi es[0].removeChild(ol... -
Got it! Pretty simple, I just make it a lot harder for some reason. Thanks!Leave a comment:
-
Cycling through table cells
Hey, I'm not as familiar with JavaScript as I'd like to be so I need a little bit of help with a problem I've got. I've got a table that I need to cycle through and gather what is on the inside of each cell, and store them into something like an array.
The table has an undetermined amount of rows (they can be created by the user) but it has 8 cells within each row I need to get the contents out of. I'd like to put it all into an array,... -
Alright, lets see. This may work a bit better...
I have html set up like this:
Code:<table> <tbody> <tr id="/1234"> <td></td> </tr> <tr id="/boot1234"> <td></td> </tr> <tr id="/usr1234"> <td></td> </tr> </tbody>
Leave a comment:
No activity results to display
Show More
Leave a comment: