Hi All

My deepest apologies for posting here, but im so stuck with Javascript
at the moment.

I have a html file when on loading executes a javascript function
(random_mainpage() ). which reads the array (sarray) and displays in
content on the browser.

I to have a link that onclicking must execute (pframe()) with the
argument of the number, which in the element of the sarray.

The problem is that onclicking the link the pframe() executes but does
not display the content in the same place as where the random_mainpage()
displays its content.

Im sure that since this thread had nothing to do with this mailing list
that most others would appreciate that it be taken of the list, taken in
a of the list manner.

If anyone would be so kind as to help, it would be greatly be appreciated.

Kind Regards
Brent Clark

=========================================================================
<tr onMouseover="this.bgColor='#e8eeff'"
onmouseout="this.bgColor='#FFFFFF'"><td><a href="javascript:void(0)"
id="1" name="1"     onclick="pframe('1')" >Cape Town</a></td></tr>


function random_mainpage(element){ if(element){ //alert("WORKS " + element); for(a = 0; a < sarray[element].length; a++){ document.write(sarray[element][a]); } }else{ var num = Math.floor( (Math.random() * sarray.length)); if(num < 0){ num + 1; } var MyMap = "/images/index/map_"+num+".gif"; document['map'].src=MyMap;

                        for(a = 0; a < sarray[num].length; a++){
                                document.write(sarray[num][a]);
                        }
        }
}

function doc_write(entry){
        return document.write('<tr><td><img width="98" height="98"
src="/images/index/'+entry+'.jpg"  /></td></tr>');
}

<td id="mn" name="mn" rowspan="6" valign="top">
        <script language="javascript">
                random_mainpage()
</script>


sarray[1][0] = '<table cellspacing="0" cellpadding="0" border="0" valign="top">'; sarray[1][1] = '<tr><td class="bold_eight" bgcolor="#e9e9e9"
&nbsp;&nbsp;Cape Town</td></tr>';

..... <carrys on>

sarray[1][23] = '</tr>';
sarray[1][24] = '</table>';


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to