473,763 Members | 4,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form submit from A tag with Netscape

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="javascrip t:document.f1.s ubmit();">
Test
</a>
</form>

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

WHo knows what is wrong with my code?

Thanks!
Jul 20 '05 #1
5 1722
Ig**********@ya hoo.com (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="javascrip t:document.f1.s ubmit();">
<a href="whyThisPa geRequiresJavas cript.html"
onclick="docume nt.forms['f1'].submit();retur n 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 - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
Lasse Reichstein Nielsen wrote:
<form name="f1" method="post" action="TTT.htm ">

<a href="javascrip t:document.f1.s ubmit();">

<a href="whyThisPa geRequiresJavas cript.html"
onclick="docume nt.forms['f1'].submit();retur n 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?

Jul 20 '05 #3
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!
Jul 20 '05 #4
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!
Jul 20 '05 #5
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:ac tive {
border: 0px solid transparent;
color: Red;
}
}
</style>
<form>
<input type="submit" name="submitBtn " value="Order" class="submitLi nk"
/>

</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 <gw*****@agrico reunited.com>

* 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
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7773
by: Marc | last post by:
Hello, I have a self - submitting form with multiple submits and I want to detect after the submit which button is pressed. Code example: <form name="example" method="post" action="/test.php"> <input type =submit name="add"> form elements but also <a href="#" onClick=document.myForm.submit()>edit</a>
2
5335
by: Alexander Ross | last post by:
I know that <a href="javascript:document.formname.submit();"> works for this, but can you use a hyperlink to submit a form WITHOUT assigning the form tags name attribute a value. The site I am currently working on is supposed to be HTML 4 (w3c) complient, but according to the HTML validator the name attribute has been depreciated and should no longer be used. I'm not saying I agree with this, just that I have little choice in the matter....
13
40762
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
7
2992
by: greg brant | last post by:
i have a form made up of 2 file inputs and a submit button.. the imputs are to upload images, namley jpeg's for a e-greatings thing im working on. this only works with jpegs so i have a script that will check the value of the imput tag to make sure it ends with .jpg, .jpeg. this works fine on the jubmit button using onclick="myHandler(this)"
1
3793
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your HTML form to. the actual form-parsing page resides on a server that's uneditable to me since it sits on an inaccessible server. my problem is more irritating than anything; everything double-submits.. when you submit the form, I've forced a...
7
4892
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes because then it didn't work in IE. How can I enable this javascipt form validation to work in Netscape? When I use netscape, none of the alert boxes appear. It submits the form without validating anything.
14
14184
by: Chris | last post by:
Heres my problem: <a href="javascript:void(document.buysell.submit())" target="_parent" onMouseOver="MM_swapImage('members','','images/membersf2.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="images/members.gif" alt="Back to members page" name="members" width="270" height="25" border="0"></a> I get the error "document.buysell" is null or not an object, but my form name is buysell and when using the submit button, which is not
4
3317
by: Yashwant | last post by:
Dear Netscape/Javascript/Java gurus, I am trying to submit a form onUnLoad when the user accidentally closes the browser before clicking on a link to complete the transaction. On IE, this works fine. But on Netscape or Mozzilla browsers, the form would simply not submit when the browser is closed.
2
1658
by: lmeng | last post by:
Hi, I am new to this Forum. Thanks in advance for any kind help. In the following HTML code, when I change the value of one text field then click "Modify" button, if the validation fails a message will popup and the cotent of the form should NOT be submitted. (The actual code connects to the database at the backend so I can check if the value is submmited).
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.