This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Recognizing a Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Recognizing a Form" Watch "Recognizing a Form" New topic

Recognizing a Form

samuel marin

Joined: Nov 18, 2011
Posts: 16
Recognizing a Form
I had created a form as follow:

I had identified the form with and id: myform.setAttribute("id","formIS");

Now I would like to identify my form to apply an IF instruction: something like:

I tried all the following options and none worked. Does anyone knows why?

I also tried to debug the code and this is what I see when I put the mouse over myform --> formis#formIS

Thanks you very much
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
What element is this? myform=document.createElement("formIS"); I have never seen that type of HTML element.

myform=document.getElementById("formIS"); getElementById returns an object, how can you compare it to a string?

It is sorta covered in the JavaRanch Style Guide.
subject: Recognizing a Form