Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Applet parameters - ignore case?

Reply
Thread Tools

Applet parameters - ignore case?

 
 
Andrew Thompson
Guest
Posts: n/a
 
      12-04-2008
I am in the process of writing an app. that can load applets
(it loads HTML, like AppletViewer, but then, different to
AppletViewer, it displays the HTML with applet*s* in a
JEditorPane). It is intended as a testing alternative to
AppletViewer.

In my app. at the moment, the parameter names need to
be the same case in the HTML, as they are in the Applet.
No browser I know of, enforces the case. Is there some
bit of the docs. I missed, that explicitly or implicitly allows
applet parameter names to be case insensitive?

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
 
 
 
Joshua Cranmer
Guest
Posts: n/a
 
      12-04-2008
Andrew Thompson wrote:
> In my app. at the moment, the parameter names need to
> be the same case in the HTML, as they are in the Applet.
> No browser I know of, enforces the case. Is there some
> bit of the docs. I missed, that explicitly or implicitly allows
> applet parameter names to be case insensitive?


<http://java.sun.com/javase/6/docs/api/java/applet/Applet.html#getParameter%28java.lang.String%29>:
public String getParameter(String name)
Returns the value of the named parameter in the HTML tag. For
example, if this applet is specified as

<applet code="Clock" width=50 height=50>
<param name=Color value="blue">
</applet>

then a call to getParameter("Color") returns the value "blue".

/The name argument is case insensitive./

Parameters:
name - a parameter name.
Returns:
the value of the named parameter, or null if not set.
[emphasis added]

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      12-05-2008
On Dec 5, 10:53*am, Joshua Cranmer <(E-Mail Removed)> wrote:
....
> <http://java.sun.com/javase/6/docs/api/java/applet/Applet.html#getPara...>:

....
> * * */The name argument is case insensitive./


Well slap me silly. Note to self - RTFM.

Thanks Joshua.

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      12-05-2008
On Thu, 4 Dec 2008 15:37:16 -0800 (PST), Andrew Thompson
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone
who said :

>
>In my app. at the moment, the parameter names need to
>be the same case in the HTML, as they are in the Applet.
>No browser I know of, enforces the case. Is there some
>bit of the docs. I missed, that explicitly or implicitly allows
>applet parameter names to be case insensitive?


see http://mindprod.com/jgloss/applet.html#APPLETTAGS

look at the PARAM section.
--
Roedy Green Canadian Mind Products
http://mindprod.com
"Humanity is conducting an unintended, uncontrolled, globally pervasive experiment
whose ultimate consequences could be second only to global nuclear war."
~ Environment Canada (The Canadian equivalent of the EPA on global warming)
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      12-05-2008
On Dec 5, 1:09*pm, Roedy Green <(E-Mail Removed)>
wrote:

> see http://mindprod.com/jgloss/applet.html#APPLETTAGS


Thanks Roedy. Good page, as usual.

One or two typos.
"Applet parameter values are case sensitive (passed exactly as written
to your Applet’s getParameter. If you want lower case, use parmValue.)
toLowerCase()."

The second last ')' seems misplaced.
"Applet parameter values are case sensitive (passed exactly as written
to your Applet’s getParameter. If you want lower case, use
parmValue.toLowerCase())."

Two table rows down..
"and finally the ending tag for the"
"And finally the ending tag for the applet."

Oh, and while I was busy shoe-horning the APPLET
element into a HTMLEditorKit, I opened a page with
comments and saw your pet hate - the comment
appearing in the web page. If I get time I might
try and figure what needs doing to ignore those
HTML comments.

Another note that your links would be clickable
(by people who use a certain web interface to
post to usenet) if they were wrapped in '<' & '>'.

The line quoted above actually appears as..

seehttp://mindprod.com/jgloss/applet.html#APPLETTAGS

...in Google Groups (note the loss of the space).

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ignore + TEST + Ignore SpooderStank Computer Support 2 04-08-2004 11:26 AM
Searching for Exact Phrase - should I ignore the ignore words? Rob Meade ASP General 6 03-01-2004 11:28 AM
Re: newbie: Join JApplet & Applet in one applet Andrew Thompson Java 0 08-05-2003 01:41 PM
Re: play wave files using java.applet.Applet webster Java 0 07-20-2003 01:51 PM
applet vs. canvas in applet Rob Love Java 1 07-07-2003 10:07 PM



Advertisments