468,244 Members | 2,028 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,244 developers. It's quick & easy.

How to write/read value from param tag?

Hi All!
I have problem...
I want to write/read value from param tag in applet, but I don't know how...
This is exaple code:
----------------------------------------------------------------------------
<applet code="example.class">
<param name="font" value="Arial">
<param name="width" value="80">
<param name="image_url" value="http://some.url/image.gif">
</applet>
----------------------------------------------------------------------------
I try something like this:
----------------------------------------------------------------------------
<script>
sfont=document.applets[0].font.value;
alert(sfont);
</script>
----------------------------------------------------------------------------
or:
----------------------------------------------------------------------------
<script>
sfont=document.applets[0].params[0].value;
alert(sfont);
</script>
----------------------------------------------------------------------------
but it doesn't work.
Please help! :)
Jul 20 '05 #1
3 7026
Try the following:

sfont = document.applets[0].getElementsByTagName('param')[0].value;

-Wagner

"SzokU" <sz***@pf.pl> wrote in message news:<bl**********@atlantis.news.tpi.pl>...
Hi All!
I have problem...
I want to write/read value from param tag in applet, but I don't know how...
This is exaple code:
----------------------------------------------------------------------------
<applet code="example.class">
<param name="font" value="Arial">
<param name="width" value="80">
<param name="image_url" value="http://some.url/image.gif">
</applet>
----------------------------------------------------------------------------
I try something like this:
----------------------------------------------------------------------------
<script>
sfont=document.applets[0].font.value;
alert(sfont);
</script>
----------------------------------------------------------------------------
or:
----------------------------------------------------------------------------
<script>
sfont=document.applets[0].params[0].value;
alert(sfont);
</script>
----------------------------------------------------------------------------
but it doesn't work.
Please help! :)

Jul 20 '05 #2
It's work! Thanks man! ;D

Uzytkownik "W d'Anjos" <wa****@yahoo.com> napisal w wiadomosci
news:b3**************************@posting.google.c om...
Try the following:

sfont = document.applets[0].getElementsByTagName('param')[0].value;

-Wagner

Jul 20 '05 #3
It's work! Thanks man! ;D

Uzytkownik "W d'Anjos" <wanjos@yahoo.com> napisal w wiadomosci
news:b36d147d.0310011108.451b564f@posting.google.c om...[color=blue]
> Try the following:
>
> sfont = document.applets[0].getElementsByTagName('param')[0].value;
>
> -Wagner[/color]
HI All,
i have created an applet dynamically from javascript with the following code:

var tbody = document.getElementById(id).getElementsByTagName(" TBODY")[0];
var row = document.createElement("TR")
var td1 = document.createElement("TD")
var app_1 = document.createElement("Applet");

td1.appendChild(app_1);

row.appendChild(td1);
tbody.appendChild(row);

now my problem is i want to set some parameters thru <PARAM> tag dynamically, how can i acheive that.
Jun 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by bdinmstig | last post: by
4 posts views Thread by John Vottero | last post: by
1 post views Thread by Petterson Mikael | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.