Click to See Complete Forum and Search --> : form related problem


noobstar
10-31-2006, 12:23 AM
Hi everyone :)

I hit this odd problem I never encountered before. My questions is, is there a way to get rid of these anoying blank lines underneath my links when they are placed in a form code for example:

<form name="text" action="test.html">
<a href="javascript.document.test.submit()">Test</a>
</form>

<form name="text2" action="test2.html">
<a href="javascript.document.test2.submit()">Test2</a>
</form>

The output would be exactly as it is shown below:

<blank line>
Test
<blank line>
Test2
<blank line>

The output i would like to have goes something like this:

| Test | Test2 |

The reason i need this is to submit a hidden textfield value to another form but i'd like a normal text link then a submit button(cause they look ugly :P).

And just to be sure everyone gets what im saying here is a link to a screenshot i made: http://img150.imageshack.us/img150/3959/formproblemoo6.jpg

Thank You very much for any help what so ever :)

Kravvitz
10-31-2006, 12:51 AM
Why don't you just use a normal link and give the URL a query string?

You can use CSS to stop the <form>s from creating new lines. display:inline works. It's best to use an external stylesheet, but you can use the CSS like this:
<form style="display:inline;">
Keep in mind that some Internet users use a browser that doesn't have JavaScript enabled. (http://www.thecounter.com/stats/2006/September/javas.php)

I suggest you read these:
Graded Browser Support (http://developer.yahoo.com/yui/articles/gbs/gbs.html)
Progressive Enhancement and the Future of Web Design (http://www.webmonkey.com/03/21/index3a.html)
Accessibility is seldom just up to the interface developer (http://www.robertnyman.com/2006/10/10/accessibility-is-seldom-just-up-to-the-interface-developer/)

noobstar
10-31-2006, 01:11 AM
Never thought of that, but then again i personally haven't used CSS as much anyways.

Thank you for your reply, it was fast to i have to say :D