H
Harvey
Hello
I was hoping someone could help me with the following problem?
Essentially I have a web page that displays an image in an IFRAME
whose source (ie big_map.gif or australia.gif etc) changes every time
the user clicks a CHANGE button (just a simple submit pushbutton)
which lies in another IFRAME.
The button submits a CGI script that ideally will return a javascript
which will alter the source of the image, rather than return HTML to
refresh the page.
Unfortunately I am reasonably new to Javascript and have had some
problems trying to accomplish this. I am hoping someone can asnwer the
following questions for me? (Answers need not address all of the below
questions, any answers are extremely appreciated as I am trying to
meet a deadline.)
1. When I return javascript it blanks the frame that encapsulates the
CHANGE button that submitted or triggered the cgi script. I understand
why this happens, or at least think I do, but would like to know how I
can return the javascript to execute without altering the existing
IFRAME it returns to?
2. I am unsure as to the exact javascript required to alter the source
of the image, from say big_map.gif to whatever is returned from the
CGI script ie little_map.gif. I was hoping someone could give me some
basic javascript for doing something similar and perhaps a link to
some information describing dynamic alteration of javascript?
3. How do you force a given IMG tag in an IFRAME to refresh (using
Javascript) after you have dynamically changed its source (ie from
big_map.gif to little_map.gif) or does the image refresh automatically
if its source is changed?
4. In general what is the easiest way to exchange small amounts of
data (ie a map name) between a web page (using HTML and Javascript)
and a CGI script, that ideally does not involve repainting or
refreshing the web page ?
I hope that I have articulated my questions so as to be
understandable? Apologies for any confusion if I have not.
Any and all help is appreciated.
Sincere thanks for your time and efforts.
Harvey
I was hoping someone could help me with the following problem?
Essentially I have a web page that displays an image in an IFRAME
whose source (ie big_map.gif or australia.gif etc) changes every time
the user clicks a CHANGE button (just a simple submit pushbutton)
which lies in another IFRAME.
The button submits a CGI script that ideally will return a javascript
which will alter the source of the image, rather than return HTML to
refresh the page.
Unfortunately I am reasonably new to Javascript and have had some
problems trying to accomplish this. I am hoping someone can asnwer the
following questions for me? (Answers need not address all of the below
questions, any answers are extremely appreciated as I am trying to
meet a deadline.)
1. When I return javascript it blanks the frame that encapsulates the
CHANGE button that submitted or triggered the cgi script. I understand
why this happens, or at least think I do, but would like to know how I
can return the javascript to execute without altering the existing
IFRAME it returns to?
2. I am unsure as to the exact javascript required to alter the source
of the image, from say big_map.gif to whatever is returned from the
CGI script ie little_map.gif. I was hoping someone could give me some
basic javascript for doing something similar and perhaps a link to
some information describing dynamic alteration of javascript?
3. How do you force a given IMG tag in an IFRAME to refresh (using
Javascript) after you have dynamically changed its source (ie from
big_map.gif to little_map.gif) or does the image refresh automatically
if its source is changed?
4. In general what is the easiest way to exchange small amounts of
data (ie a map name) between a web page (using HTML and Javascript)
and a CGI script, that ideally does not involve repainting or
refreshing the web page ?
I hope that I have articulated my questions so as to be
understandable? Apologies for any confusion if I have not.
Any and all help is appreciated.
Sincere thanks for your time and efforts.
Harvey