Hi all,
the code where i am finding a problem is as follows: -
<html>
-
<head>
-
<script>
-
function fun1(){
-
window.document.formName.action="/someServlet";
-
window.document.formName.submit();
-
}
-
</script>
-
-
</head>
-
-
-
-
<body>
-
<form name="formName" action = "/ab.jsp" method ="post">
-
<a href="#" onClick="fun1();" >Some Link</a>
-
-
</form></body>
-
</html>
-
The problem here is when i click on the hyperLink it goes to the onClick method and from there the action is set to be redirected to a servlet(even when action was set to a jsp it didnt work), but it doesnt call the submit() method after that,...
Why is this so???
Plz do clarify the doubt....
7 2736 acoder 16,027
Recognized Expert Moderator MVP
Welcome to TSDN!
I've never worked with servlets so this may be a useless question, but do servlets not require an extension, e.g. .jsp?
Try: - document.forms["formName"].action="/someServlet";
-
document.forms["formName"].submit();
Your form doesn't have any elements, so what's going to be posted?
Hi...
Well the action is going to some controller which in my case is a servlet.
I put alert before the submit() method. I am even gettin that alert but after that the form is not getting submitted....
Why is it so???
acoder 16,027
Recognized Expert Moderator MVP
Try adding some form elements. It's an empty form.
I have some table and div in the form i am workin in,,,,
So wat after that
acoder 16,027
Recognized Expert Moderator MVP
I have some table and div in the form i am workin in,,,,
So wat after that
Post the code. Do you get any errors?
Well the flow is as follows...
There is one jsp(java code in HTML file) by name Options.jsp and it has a top file called TopFrame.jsp . there is a hyperLink in Options.jspt file say like this: - <a href="javascript:void(0);" onClick="logoff()">Logout</a>
this logff() method has code like this
the Topframe.jsp has in its body onLoad method calls one more logOff method in that TopFrame.jsp file.
In this logoff method i am calling -
document.formname.action="/someservlet"
-
alert("Came before submit");
-
document.fromname.submit();
-
i reach till the alert message is thrown but after that submit is not called.... This is wat my concern was./...
acoder 16,027
Recognized Expert Moderator MVP
Check your code that it doesn't contain form elements with the name "action".
Do you not see any errors?
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
by: GTi |
last post by:
Hello...
I have a page located in a frame. This page contains a form.
When the user submit this form I want to popup a "Please Wait" window popup
window
The post may take some time for the server to process.
So when the new windows is loaded into the browser, I want to close this
Wait window.
I have found a global JavaScript variable I may use.
|
by: Terence Parker |
last post by:
I have a form which enables users to type in some text in a <TEXTAREA>,
allowing them to use HTML. I have defined two submit buttons - one to
submit as usual, but one which I would like to popup another window and
submit the typed text to different action/script to give a preview.
So far I have done this (removing the excess formatting HTML for clarity):
----------
<SCRIPT language="JavaScript" type="text/javascript">
function...
|
by: D. Alvarado |
last post by:
Hello,
I am trying to open a window containing an image and I would like
the image to be flush against the window -- i.e. have no padding or
border. Can I make this happen with a single call to a window.open
function? I would prefer not to create a separate HTML page. So far
all I have is the basic
var cwin = window.open('images/KJV-THANKS.gif',
'Thanks', 'width=243,height=420,');
cwin.focus();
|
by: jackson2005 |
last post by:
OK, I need to do three different things.
On the ONLOAD event I would like a popup box to open. In this popup
box I need two text boxes. One for the UserName and one for the
BillingTo name. After entering these two items the user can either hit
the enter key or press the submit button. The popup window will close
and then those two text boxes in the original webpage will be filled in
automatically.
I would like to have the two...
| |
by: midnight_use_only |
last post by:
hi all,
quick question, how do you submit a form to a parent window from a
child popup window? i have the following and all online documentation
*suggests* that it should work but it does NOT:
// Parent window:
<script language="JavaScript">
function popup(url, name)
{
window.open(url, name, "width=800,height=600,scrollbars=yes");
|
by: Devika |
last post by:
Hi,
I am working on online recharge module. Everything is in place but when
you click on submit it does not notify user that the request is getting
processed and he needs to wait for couple of seconds. I need to add a
popup window displaying this message. Can anyone suggest me how to do
this? I just need to open 1 window , sense some event in parent window
and then close the popup window..Kindly please help
I truly apppreciate your...
|
by: tshad |
last post by:
This was posted before but the message got messed up (all NLs were stripped
out for some reason).
I have 2 labels that hold the name of different images on my .aspx page.
<asp:Label ID="Logo" runat="server"/>
<asp:Label ID="CompanyPicture" runat="server"/>
I have 2 links that open the windows to preview these images. The previewed
images are done on separate html pages that do nothing but display the
|
by: V S Rawat |
last post by:
using Javascript, I am opening a web-based url in a popup window.
MyWin1=Window.Open(url, "mywindow")
There is a form (form1) in the url in that popup window, I need to
submit that form.
How do I submit that form1 from the javascript from my current window?
Thanks.
|
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...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |