Tom Hopkins

Greenhorn
+ Follow
since Aug 10, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tom Hopkins

Thanks Ajith for you quick reply. I am indeed trying to check to see if the node in question is the first child of the root node. I tried your suggestion and it works. Thanks again.
I'm trying to determine whether a given node is the first node in a DOM tree. Is there a way to do this?
Thanks
Found my own answer to this one.
document.formName.selectName[i].checked = true;
Son of a Gun - it worked. Very cool.
I hate to be a bother, but how would I select a radio button. I know only one can be selected at a time, I'm just wondering how to select from javascript.
Thanks
Bosun,
Thanks for your reply, but I don't think I worded my question properly.
I do indeed have MULTIPLE as an attribute to the SELECT tag and as such a user can of course select multiple options from the list box.
My question was related to a post from yesterday wherein someone asked how to select options in a list box from javascript (ie. so that when the page loads certain options are already selected).
Further posts indicated using something similar to
document.formName.selectBoxName.selectedIndex = n;
which works for selecting ONE item from a list box. I wanted to know if anyone knows of a way to select multiple options from javascript.
I hope this makes sense.
You know I'm still not sure why this isn't working because I've used window.location=... before for similar purposes. I can only imagine it may have been a synchronization issue where perhaps the updated file was not available in time for the call to window.location. But thats just a guess. Anyway, I ended up setting the target attribute of the form I'm submitting to indicate the frame which should ultimately hold the resulting html and everything works fine (every time). Probably should have thought of this sooner.
I was glad to see this question posted as I previously thought it wasn't possible. This brings me to my next question, can you select multiple options from a select box upon loading a page?
Thanks
Will this work for selecting multiple selections from the select box? If so, how?
I'm not sure about this but I noticed noone else has chimed in yet so here goes...
Maybe you could use setInterval(code, delay), which returns an intervalID, to do your incrementing repeatedly and then clearInterval(intervalID) to stop it. I guess you'd want to use an onMouseUp event to trigger the clear.
I haven't used this myself, only read about it. Good luck.
I'm working on an app where one frame calls a servlet that does an xsl:sort to update an html doc. I'm using 'response.sendRedirect' to bring me back to the frame that called the servlet, but then I need to refresh the frame that displays the html that was just updated. I've been using 'parent.framename.location = relativeURL' to accomplish this, but with limited success. It seems to work only on every second update. I know the transform is successful and the html is updating every time, but the display frame doesn't update. I also dont' think its a caching problem, as I'm using
<META CONTENT="-1" HTTP-EQUIV="Expires">
<META CONTENT="no-cache" HTTP-EQUIV="Pragma">
<META CONTENT="no-cache" HTTP-EQUIV="Cache-Control">
<META CONTENT="no-store" HTTP-EQUIV="Cache-Control">
in the head of the html doc. So is there another way to do this? Can I redirect to a frame other that the one that called the servlet? If so, how?
Thanks in advance
22 years ago
I'm working on an app where one frame calls a servlet that does an xsl:sort to update an html doc. I'm using 'response.sendRedirect' to bring me back to the frame that called the servlet, but then I need to refresh the frame that displays the html that was just updated. I've been using 'parent.framename.location = relativeURL' to accomplish this, but with limited success. It seems to work only on every second update. I know the transform is successful and the html is updating every time, but the display frame doesn't update. I also dont' think its a caching problem, as I'm using
<META CONTENT="-1" HTTP-EQUIV="Expires">
<META CONTENT="no-cache" HTTP-EQUIV="Pragma">
<META CONTENT="no-cache" HTTP-EQUIV="Cache-Control">
<META CONTENT="no-store" HTTP-EQUIV="Cache-Control">
in the head of the html doc. So is there another way to do this?
Thanks in advance
Thanks anyway, I found an answer - <jsp:include>.
I'm writing a jsp and would like some html described content to be displayed withing the jsp. The html I want to include is dynamically generated by xsl. Is there a way to include the html in the jsp document. I'd rather not use seperate frames because I'd like the finished product to scroll as one page. I tried using <IFRAME> but I can't set the height attribute becuase I don't know in advance how long the dynamic html will be.
Any suggestions?