tayiper
11-05-2007, 03:38 PM
In this post I'll write about a confusion regarding some particular form on my website. As a result of things mentioned in this post of mine (http://forums.digitalpoint.com/showpost.php?p=5101556&postcount=34) in some thread on DP forums, I checked the code of some particular form on my website: http://tadejpersic.50webs.com/index.html (please visit it to actually see what I am talking about)
I am talking about that line/row of buttons, while the problematic one is the first one, which uses an external .js file and which function is to bookmark the current page (the other two buttons with <input type="image" in this line/row are to open a search and contact pages); here below is the original code of the "bookmark page" form:
<form action="#">
<input type="button" value="Bookmark us!" onclick="bookmark('http://javascript.internet.com/','JavaScript Source')">
</form>
Well, and then I checked the code as it is currently on my website, and I noticed that (not sure why/when, but as you can see, this is the only way to show them all in one line; please see below) I changed it so that it looks like (compare to the original "bookmark page" form code above) I forgot to close it with the "</form>" ending tag. So here below is the code of the "bookmark page" form (and I also included the code of buttons that open search and contact pages) as it is on my website, and it surely works as it should, and the page is validated by the W3C checker:
<form action="#" /><input type="image" src="save.png" title="bookmark page" onclick="bookmark('index.html','Tadej Persic\'s website | index')" /> <input type="image" src="search.png" title="search site/web" onclick="window.open('search.html','search','height=560,width=440')" /> <input type="image" src="contact.png" title="contact me" onclick="window.open('contact.html','contact','height=560,width=440')" />
But if I change the code to remove the " /> part (i.e. to become ">) and add the closing "</form>" tag as you can see in the first example below, then the "bookmark page" button is placed in its own line above the line/row with the rest of the buttons. Here below are examples of the code of the "bookmark page" form (with the code of buttons that open search and contact pages removed for you to easily see the change); in the first example there's the code as it is after I modified it (i.e. I changed the " /> part to become ">, and added the closing tag, as mentioned above), and as it was/and still is originally on my website:
<form action="#"><input type="image" src="save.png" title="bookmark page" onclick="bookmark('index.html','Tadej Persic\'s website | index')" /></form> ...
<form action="#" /><input type="image" src="save.png" title="bookmark page" onclick="bookmark('index.html','Tadej Persic\'s website | index')" /> ...
Therefore I am curious: is the form of the code like I modified it afterwards correct, or should I close it with the ending tag "</form>" as it is in the original code (it's an example from some tutorial I guess)of the mentioned form??!
tayiper
I am talking about that line/row of buttons, while the problematic one is the first one, which uses an external .js file and which function is to bookmark the current page (the other two buttons with <input type="image" in this line/row are to open a search and contact pages); here below is the original code of the "bookmark page" form:
<form action="#">
<input type="button" value="Bookmark us!" onclick="bookmark('http://javascript.internet.com/','JavaScript Source')">
</form>
Well, and then I checked the code as it is currently on my website, and I noticed that (not sure why/when, but as you can see, this is the only way to show them all in one line; please see below) I changed it so that it looks like (compare to the original "bookmark page" form code above) I forgot to close it with the "</form>" ending tag. So here below is the code of the "bookmark page" form (and I also included the code of buttons that open search and contact pages) as it is on my website, and it surely works as it should, and the page is validated by the W3C checker:
<form action="#" /><input type="image" src="save.png" title="bookmark page" onclick="bookmark('index.html','Tadej Persic\'s website | index')" /> <input type="image" src="search.png" title="search site/web" onclick="window.open('search.html','search','height=560,width=440')" /> <input type="image" src="contact.png" title="contact me" onclick="window.open('contact.html','contact','height=560,width=440')" />
But if I change the code to remove the " /> part (i.e. to become ">) and add the closing "</form>" tag as you can see in the first example below, then the "bookmark page" button is placed in its own line above the line/row with the rest of the buttons. Here below are examples of the code of the "bookmark page" form (with the code of buttons that open search and contact pages removed for you to easily see the change); in the first example there's the code as it is after I modified it (i.e. I changed the " /> part to become ">, and added the closing tag, as mentioned above), and as it was/and still is originally on my website:
<form action="#"><input type="image" src="save.png" title="bookmark page" onclick="bookmark('index.html','Tadej Persic\'s website | index')" /></form> ...
<form action="#" /><input type="image" src="save.png" title="bookmark page" onclick="bookmark('index.html','Tadej Persic\'s website | index')" /> ...
Therefore I am curious: is the form of the code like I modified it afterwards correct, or should I close it with the ending tag "</form>" as it is in the original code (it's an example from some tutorial I guess)of the mentioned form??!
tayiper