By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,665 Members | 1,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,665 IT Pros & Developers. It's quick & easy.

How to write/read value from param tag?

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: 2
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.