I'm using your hvscroller for a number of things, including a news tickertape and a "rollover" page, where you can cycle through different content using mouseovers.
Now, I want to be able to print whatever is currently displayed. The name of the active page is in pageName, but I'm not quite sure how to extract the HTML code from there. I'm still looking, but I would like to know if you have an easy way of doing this.
-garison
2) Angus TurnbullGroup: Guests IP: 210.54.--.--
Posted:
I'd just use scrollerName.div.ref.innerHTML which won't work in NS4. You could always construct your scroller pages using a CGI script and use the same data to produce a "print-friendly" page? Or try the other scroller script, since it uses external files this is an easy question with that :).
- Angus.
3) Garison PiattGroup: Guests IP: 24.25.--.--
Posted:
Okay, it's "sort of" working. I have this:
function ilsPrint() { with (this) { if (!pageName || !isDyn) return; if (isNS4) return;
As you can see, I'm not that concerned if it doesn't work on NS4. To print, I have a form: <form action="#"> <input type="submit" value="print" onClick="scr.print(); return false;" style="font-size: 11px; color: Black; background-color: #CCCCFF;" > </form>
Everything works fine, except that after it prints, I get a JavaScript error, "isNS4 is not defined" at line 64, which is in the middle of the ilsScrollTo function. Not quite sure what's going on. Any ideas?
-garison
4) Angus TurnbullGroup: Guests IP: 210.55.--.--
Posted:
Not really -- you've hacked up the code a lot from the standard script, so I can't really second-guess or debug your own modifications. Make sure you're not referencing isNS4 from within the popup window?
- Angus.
5) Garison PiattGroup: Guests IP: 24.25.--.--
Posted:
Actually, that *was* the problem. This-- <script language="JavaScript1.2"><!-- if (!isNS4) document.write('</div></div>'); //--></script> was at the end of the captured data. All I have to do now is search for "<script" and take everything to the left of it.
And I wouldn't quite say "hacked up" -- I've left your original code intact, and added my stuff separately. My thinking is, at some point you will have an update to this software, and I want to use that upgrade as painlessly as possible.
-garison
6) Garison PiattGroup: Guests IP: 24.25.--.--
Posted:
Yup, works like a champ. Check out: http://www.robinajessbotanicalart.com/rollover.php?keyword=bio It's used on several pages in this site. Actually, it's only used on one page here, but we use keywords to change what's displayed. Note the scroll bar on the right; pretty easy to do.
We also use this on http://rtut.com. We had to switch over because the code I wrote wouldn't work on a Mac. (No such a big deal, IMHO, but others think it is.)
And yes, that's your menu on both sites.
BTW: did you ever get a donation from my client, Carol Dickert? Let me know if not, and I'll remind her again.
-garison
7) Angus TurnbullGroup: Guests IP: 210.54.--.--
Posted:
Glad you're on track! Yes, external plugin-type code is a good idea :).
A quick search of my Inbox reveals nothing for "Dickert", so if you want to check with her that would be fine.