Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Form submit from A tag with Netscape

Reply
Thread Tools

Form submit from A tag with Netscape

 
 
Keith Bowes
Guest
Posts: n/a
 
      01-12-2004
Lasse Reichstein Nielsen wrote:
>
>><form name="f1" method="post" action="TTT.htm">
>>
>><a href="javascript:document.f1.submit();">

>
>
> <a href="whyThisPageRequiresJavascript.html"
> onclick="document.forms['f1'].submit();return false;">
> Test
> </a>
>


Why not style the button with CSS, so that it will look like the typical
visual representation of a link? Or, dynamically write the link and
include a standard submit button in the "noscript" element?

 
Reply With Quote
 
 
 
 
ddt_rock
Guest
Posts: n/a
 
      01-12-2004
Hello, everyone!

I have a problem with Netscape.
I want to submit form from <A> tag

<form name="f1" method="post" action="TTT.htm">

<a href="javascript:document.f1.submit();">
Test
</a>
</form>

This code works fine in IE, but Netscape just ignores it.

WHo knows what is wrong with my code?

Thanks!
 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      01-12-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (ddt_rock) writes:

> I have a problem with Netscape.


You have a problem with your code running on Netscape
Which Netscape, by the way?

> I want to submit form from <A> tag


Why? The submit button is made for just that, and the user will
know what it means.

> <form name="f1" method="post" action="TTT.htm">
>
> <a href="javascript:document.f1.submit();">


<a href="whyThisPageRequiresJavascript.html"
onclick="document.forms['f1'].submit();return false;">
Test
</a>

> This code works fine in IE, but Netscape just ignores it.
>
> WHo knows what is wrong with my code?


Probably the reference to the form. Try the more explicit version here.
And don't use "javascript:"-URIs, the onclick attribute is much better.


/L
--
Lasse Reichstein Nielsen - (E-Mail Removed)
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
Igor Mikhalyev
Guest
Posts: n/a
 
      01-12-2004
How can I define CSS for a button, so it will look as a simple link?



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Igor Mikhalyev
Guest
Posts: n/a
 
      01-12-2004
I am using Netscape 4.78.

And your code is not working on it

I can not use buttons here because of the requirements I have

Anyway, thanks!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Grant Wagner
Guest
Posts: n/a
 
      01-21-2004
Igor Mikhalyev wrote:

> How can I define CSS for a button, so it will look as a simple link?


If you want something that looks like a link to submit a form, I
recommend something like:

<style type="text/css">
..submitLink {
background-color: transparent;
border: 0px solid transparent;
color: Blue;
text-decoration: underline;
cursor: pointer;
cursor: hand;
}
..submitLink:active {
border: 0px solid transparent;
color: Red;
}
}
</style>
<form>
<input type="submit" name="submitBtn" value="Order" class="submitLink"
/>

</form>

Certainly it isn't as pretty in Netscape 4 or Opera 6, but it's
guaranteed to give you a usable submit button regardless of the browser
being used (presuming the browser supports form and form submission).

By the way, Opera 7.23 is *still* having problems with this design. With
7.23, it now honors border requests on buttons, but it honors neither
the cursor: nor the text-decoration: directives. Also, Opera 7.23 seems
to support the :active pseudo-class, at least partially, it makes a
valiant attempt to honor the border: directive, but it fails to do it
correctly.

--
| Grant Wagner <(E-Mail Removed)>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html


 
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
error "A form tag with runat=server must exist" but there is a form tag!! André ASP .Net 2 06-23-2008 07:49 AM
submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit abansal.itp@gmail.com Javascript 3 06-23-2007 07:29 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
Form doesn't submit onUnload in Netscape Yashwant Java 3 05-04-2004 12:48 PM
netscape 4.7: onmouseover not working when i put <a> tag within a div tag Eqbal Z Javascript 6 08-27-2003 12:56 AM



Advertisments