Forms and javascript

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I do a lot of hacking when I program.  I don't know javascript but
have hacked code to use on my noncommercial web pages.

Right now I have two problems, one I need to solve and one that
I would like to solve.  I am trying to create something to display
photos that I took in Belize.  The first page shows a map of an
archeological site and next to it is a list of places on the site.
The list is a form using radio buttons.  The next page will show
thumbnails of one location of the archeological site along with a

Now I want to bring up a new window to display the photos.   I
have a small javascript that I found to bring up a new window,
using the following command.

<a HREF="/art/creative1.htm"
onclick="NewWindow(this.href,'name','600','700','yes');return false"
Quoted text here. Click to load it

When I select a location on the list and enter "Submit" I would
like a new window to come up and load a page I generate from
a perl script.
I could do it using a list of links instead of a list in a form but I
am not sure how to load the page from a cgi script using a link.

The second thing is to have a location on the map to highlight
when the location is selected on the list.  I will have it highlight
when moused over but to have the highlighting linked to the list
would be nice also


Re: Forms and javascript

One easy fix to your methodology in the use of bringing up a new window
with the picture, you could just do something like this:
   <a href="/art/creative1.htm" target="_blank"><img
src="/img/photos/art/thumb_sunrise01_ship2.jpg" border="0"></a>
About your loading a page using a perl script, what are you talking
about?  You could click that and use the onClick function of JavaScript
to run a function that runs the Perl script, but otherwise I don't
understand you.
Highlighting a location on a map would just use the concept of an image
map.  You could just designate certain areas that you would wish to
outline and if one clicks upon that area, they will go on a link to
another page.  This all uses common HTML, so I don't know why you are
bothering with JavaScript or Perl.


I remain your most humble and ob't sv't.

Patrick Reilly
1st Coy
Colonel Seth Warner's Regiment

Site Timeline