Hi fellow web developers!
I have a little problem due to my lack of javascript / web developing
skills...
Basically I have a form embedded in a table. WHat I would like to do,
is have the form be submitted when I click on a href link. Currently
it appears that the page reloads - but nothing actually is submitted.
here is a demo code,,, is it something in the head?
<html>
<head>
<SCRIPT language="JavaScript">
function submitCode()
{
document.ApplyCode.submit();
}
</SCRIPT>
</head>
<body>
<table>
<tr>
<td>
<form action="thisPage.jsp" name="SubmitCode"
method="post">
Code:
<input type="text" name="Code" />
<!-- this is the line that doesnt work right -->
<a href="thisPage.jsp"
onClick="javascript: submitCode()">
Click Me
</a>
</form>
</td>
</tr>
</table>
</body>
</html> 3 1276
On Sep 25, 1:51*am, trfilmograp...@gmail.com wrote:
Hi fellow web developers!
I have a little problem due to my lack ofjavascript/ web developing
skills...
Basically I have a form embedded in a table. *WHat I would like to do,
is have the form be submitted when I click on a href link. *Currently
it appears that the page reloads - but nothing actually is submitted.
here is a demo code,,, is it something in the head?
<html>
<head>
<SCRIPT language="JavaScript">
* * * * function submitCode()
* * * * {
* * * * * document.SubmitCode.submit();
* * * * }
</SCRIPT>
</head>
<body>
<table>
* <tr>
* * *<td>
* * * * * *<form action="thisPage.jsp" name="SubmitCode"
method="post">
* * * * * * * * * * * * Code:
* * * * * * * * * * * * <input type="text" name="Code" />
* * * * * * * * * * *<!-- this is the line that doesnt work right -->
* * * * * * * * * * * * * * * * * * * * * * * * <a href="thisPage.jsp"
onClick="javascript: submitCode()">
* * * * * * * * * * * * * * Click Me
* * * * * * * * * * * * * </a>
* * * * * * * * </form>
* * </td>
*</tr>
</table>
</body>
</html>
oops - Just so you know, there is still an issue, but the demo above
mis-named the form in the javascript... still need some guidance..
Le 9/25/08 8:16 AM, tr************@gmail.com a écrit :
On Sep 25, 1:51 am, trfilmograp...@gmail.com wrote:
>Hi fellow web developers!
oops - Just so you know, there is still an issue, but the demo above
mis-named the form in the javascript... still need some guidance..
You must stop the HTML link
(with return false;)
E.G. :
<a href="page.htm"
onclick="alert(this.href); return false;">href</a>
page's code :
-------------
<html>
<head>
<script type="text/javascript">
function submitCode()
{
document.SubmitCode.submit();
return false;
}
</script>
</head>
<body>
<table>
<tr>
<td>
<form action="thisPage.jsp" name="SubmitCode"
method="post">
Code:
<input type="text" name="Code" />
<!-- this is the line that doesnt work right -->
<a href="thisPage.jsp"
onclick="return submitCode()">
Click Me
</a>
</form>
</td>
</tr>
</table>
</body> tr************@gmail.com wrote:
On Sep 25, 1:51 am, trfilmograp...@gmail.com wrote:
>I have a little problem due to my lack ofjavascript/ web developing skills... [...] here is a demo code,,, is it something in the head?
[junk removed]
oops - Just so you know, there is still an issue, but the demo above
mis-named the form in the javascript... still need some guidance..
You should learn HTML before you make an attempt at Web programming.
<http://validator.w3.org/>
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: rigga |
last post by:
Hi,
I am trying to code a menu for a webpage, the menu is broken up to groups
i.e:
Home
Group1
 menuitem1
 menuitem2
 menuitem3
|
by: Inyeol Lee |
last post by:
I'm an OOP newbie, and needs help on subclassing from different module.
I made a base module a.py which contains two classes C1 and C2;
## start of a.py
class C1(object):
def m(self):...
|
by: Newbie |
last post by:
I am extremely new to the working of XML. Our client wants us to
access their Website. They also want us to retrieve XML (files?) from
their site. We will then somehow import it into our SQL...
|
by: ashmangat |
last post by:
Hey I am new, but I don't have time to intruduce myself yet.
I am intro to C++
and this is a programme I have to write.
all the direction are here, It will be very nice of someone to figure
this...
|
by: guanfenglin |
last post by:
Hi guys,
I am a newbie in Visual Web Developer Express 2005.
I have created a datasource bind to a ORACLE table, with a custom
select query, it has a where clause to filter the id specified.
...
|
by: guanfenglin |
last post by:
Hi guys,
I am a newbie in Visual Web Developer Express 2005.
I have created a datasource bind to a ORACLE table, with a custom
select query, it has a where clause to filter the id specified.
...
|
by: XML Beginner |
last post by:
I have an XML file that contains values that my application needs, so it
knows which database to connect to. It also contains a configuration option
so that I can specify which node to return...
|
by: R69D |
last post by:
Hi,
I'm real new to Java and need some help...was going through some old tutorials and need help with these questions:
1)What is “composition of methods?” How do u define the composition of...
|
by: gavilaso |
last post by:
Hi, i'm completly a newbie on PHP, I'm trying to make a static site search where i'm giong to put 2 category on a combobox for query..
box 1
Citys
Carolina
San Juan
Ponce
Box 2
...
|
by: Hunter |
last post by:
Hi all,
I know it may sound like dump newbie question (which is very much
true, as I am a newbie, not even a real programmer), but I need to
implement a calendar time clock with a millisecond...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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,...
|
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...
|
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...
| |