a little HTML help please?

popup windows

As many of you know, I’m collecting RMAA soundcard benchmark results and posting them on the web.

I’m writing a little script that eats the results and compiles a table of all the results. The table has links so that if you click on a value in the table, it pops up a window showing the graph for the results. So far so good.

I’d like a few additional capabilities, and I think they can be done with very simple javascript (or maybe not even that).

I want adjust the popup graph window:
- minimum buttons, etc
- sized appropriately for the graph
- titled the way I want it

I don’t want to have to generate html pages for each .png graph file, but I can do that if necessary to get the title.

Also, if anyone’s an XML wizard willing to help me, I could just generate XML and someone could help me write the stylesheets (or whatever) to show the data and be able to sort by different columns (e.g., see which card has the lowest noise level). This probably isn’t very important, though.

Thanks!

It’s easy to pop up a window. Here’s some javascript. Havethat called when clicking on a button and it will open the named html page in a new window. It’s simiar to a link.

Use the INPUT html tag to call the javascript function.


Code Sample

JAVASCRIPT
function opensplash()
{
window.open(’./splash.html’,‘Splash’);
return true;
}

HTML




I can’t remember the parameters window.open takes, but the size and whether or not tollbars and buttons are shown can be set with those. I haveto get home to find that stuff.

I have no clue about XML…at least not a useful clue.

Just found this on the phootoons index (slightly edited)

Code Sample

function openhelp()
{
var here;
here = “./help.html”
window.open(here,“PhooHelp”,“toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=500,height=500”);

return true;
}

Thanks!

What do you enclose the javascript in? I know I’ve seen it, but don’t remember.

I should have included that. Sorry. (I don’t remember if return true is needed…probably not, but it might not be 100% correct jcode if it’s not there.)

Code Sample




thanks man - you da dude! :D

Does “onClick” work for “<A href=” links, or does it have to be a form button (input)?

Never mind … it does! (When you remember to quote the spaces, doh!)

arrgh, though - the original window follows the link … oh well. Seems to me I’ve seen this happen, though.

OnClick doen’t have to be link,and probably shouldn’t be. It can be just about any html element. You can make text look like a link with formating and put the OnClick in a SPAN, or something like that.

As it turns out, it works for a table item (

). Unfortunately, the user doesn’t see the cursor change to the hand, and can’t see which graph has already been clicked on.

Any idea what I could do with “onMouseover”?

Oh – and window.open doesn’t seem to have a way to set the title bar, so I guess I’ll have to build a .html file for each graph. Yuk.

aha: :D

Code Sample


Something like this in an html element will change the pointer.

I tried that and it didn’t seem to work but I easily could have had something else in the way at the time. Anyway, the href=javascript thing seems to be working perfectly. Thanks again for the help. You provided the crucial clue! :)

Maybe it only works in . I never did look into this. Sorry. Anything you’d like for me to look for specifically?

No, thanks, it’s all good now. Someone offered to help do it right, using php/mysql, and if that pans out it’d be cool. I’m a certifiable database ignoramus.