[Javascript] Writing to Document after a function isexecuted.

Rodney Myers rmyers at i-way.co.uk
Sun Mar 25 14:17:50 CST 2001


Reuben D Budiardja wrote:

> I see your point (I think). But, I think it's ok if it overwrite, the
> current document.
> So, a frame might be a good idea, but I'm trying to avoid it.

Reuben,

The point of using frames is to avoid the overwriting of the script and
data that is doing the writing. There need be no _visible_ frames.


> I'm using
> mainly NN, so I need a cross browser compatibility. Could you point me as
> to how can I write into specific table cells?

Well this is NOT cross browser compatible, but you could take a look at
this MSIE only technique which I mentioned:

<html><head>
<title>TD ID Tests</title>
<script>
function f1(el){
var txt=el.value;
document.all.cellA.innerHTML=txt;
}
</script>
</head>
<body text='#000000' bgcolor='#ffffff'>

<form onsubmit="return(false);">
<table border=1>
<tr><td>&nbsp;</td></tr>
<tr><td ID="cellA">&nbsp;</td></tr>
<tr><td ID="cellB">&nbsp;</td></tr>

<tr><td><input name='t1' value=''
         onchange=f1(this);></td></tr>
</table>
</form>

</body></html>

When you change the value of the text box it writes into a cell.

Hope this helps someone!

Rodney

-- 
Shop at ssistant Add-ons and Developer Workshops
http://www.aflyingstart.net/addons/
STILL PLACES OPEN on Fri 27 April workshop

Courses in April 
Mon 23  : Making a Start in E-Commerce with Shop at ssistant
Tue 24  : Meeting Business Needs with the Shop at ssistant Classic system
Wed 25 : Building Better Shopping Pages with Shop at ssistant Classic


Booking for these Shop at ssistant Classic courses at 
http://www.shopassistant.net/training/  
Or call 01256 880770

Rodney Myers
Based in Oxford, England
Technical Director, Shop at ssistant eCommerce Solutions




More information about the Javascript mailing list