Hello
i have a form, where my users can choose a postal code and a city to see a
table result page with only entries of their choice.
this results have to be shown in a new window :
var firstLink = unescape(firstURL.cfm');
var secondLink = unescape(secondURL.cfm');
var thirdLink = unescape(thirdURL.cfm');
var myFormLink = unescape(formresultURL.cfm');
function popUpWindow(URLStr, left, top, width, height)
{
if(popUpWin)
{
if(!popUpWin.closed) popUpWin.close();
}
popUpWin = open(URLStr, 'popUpWin',
'toolbar=no,location=no,directories=no,status=no,m enub
ar=no,scrollbars,resizable=no,copyhistory=yes,widt h='+width+',height='+heigh
t+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
html:
<A HREF="firstLink" onClick="popUpWindow(firstLink, 40, 42, 790, 450);
return false">here my first link</A>
<A HREF="secondLink" onClick="popUpWindow(secondLink, 40, 42, 790, 450);
return false">here my second link</A>
<A HREF="thirdLink" onClick="popUpWindow(thirdLink, 40, 42, 790, 450);
return false">here my third link</A>
Now the problem:
<form name="Firmenliste" method="post" action="Schnellsuche"
onSubmit="popUpWindow(myFormLink, 20, 20, 750, 400); return false">
<input name="any1" type="text" id="any1">
<input name="any2" type="text" id="any2">
<input name="Submit" type="submit" id="Submit" value="OK">
</form>
This opens formresultURL.cfm in a new window, as expected, but the new
window didn't receive the values of any1 and any2...
Any idea, how i can solve that problem?
Thanks a lot for any help and sorry for that long description of my problem,
but i want to make it as clear as possible.
Martin Nadoll 3 4983
Martin Nadoll wrote: <form name="Firmenliste" method="post" action="Schnellsuche" onSubmit="popUpWindow(myFormLink, 20, 20, 750, 400); return false"> <input name="any1" type="text" id="any1"> <input name="any2" type="text" id="any2"> <input name="Submit" type="submit" id="Submit" value="OK"> </form>
window.open can not be used as the action for a form, to solve this you
can either use 'target="_blank"' on the form tag to open a new window on
form submit (should work afaik) or add the key/value pairs to the URL as
'GET' vars: 'http://foo.com/mydoc.html?foo=bar&bar=baz' will send
'foo=bar' and 'bar=baz' to mydoc.html. Take care of encoding chars
whenever necessary using the escape function...
Cheers,
Guido
Martin Nadoll wrote on 24 Nov 2003:
<snip> popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,m enub ar=no,scrollbars,resizable=no,copyhistory=yes,widt h='+width+',hei ght='+heigh t+',left='+left+', top='+top+',screenX='+left+',screenY='+top+''); }
It would have been nice if you split that string into concatenated
sections, rather than letting it wrap - it would have been easier to
test.
<snip>
<form name="Firmenliste" method="post" action="Schnellsuche" onSubmit="popUpWindow(myFormLink, 20, 20, 750, 400); return false">
Your onsubmit event handler unconditionally cancels the submission.
The 'successful controls' won't be submitted unless you allow it,
whether that be through a call to Form.submit(), or returning true.
I think that using a pop-up and the 'post' method would be quite
difficult, and using 'get' might be a better alternative (depending
on the content of the submission). An alternative would be to use a
redirection page that opens in the current window, opens a pop-up
with the results, then takes the main window back to the form, or
another destination.
Mike
--
Michael Winter M.******@blueyonder.co.uk.invalid (remove ".invalid" to reply)
[This may result in a double post. Apologies if so.]
Martin Nadoll wrote on 24 Nov 2003:
<snip> popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,m enub ar=no,scrollbars,resizable=no,copyhistory=yes,widt h='+width+',hei ght='+heigh t+',left='+left+', top='+top+',screenX='+left+',screenY='+top+''); }
It would have been nice if you split that string into concatenated
sections, rather than letting it wrap - it would have been easier to
test.
<snip>
<form name="Firmenliste" method="post" action="Schnellsuche" onSubmit="popUpWindow(myFormLink, 20, 20, 750, 400); return false">
Your onsubmit event handler unconditionally cancels the submission.
The 'successful controls' won't be submitted unless you allow it,
whether that be through a call to Form.submit(), or returning true.
I think that using a pop-up and the 'post' method would be quite
difficult, and using 'get' might be a better alternative (depending
on the content of the submission). An alternative would be to use a
redirection page that opens in the current window, opens a pop-up
with the results, then takes the main window back to the form, or
another destination.
Mike
--
Michael Winter M.******@blueyonder.co.uk.invalid (remove ".invalid" to reply)
--
Michael Winter M.******@blueyonder.co.uk.invalid (remove ".invalid" to reply) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matt |
last post by:
In ASP, when we pass data between pages, we usually pass by query string. If
we pass data by query string, that means we need to use submit button, not
by regular button, and the form will pass to...
|
by: js |
last post by:
Hi all.
Is there a way to 'force' a submit on a form with out actually allowing the
user to press a button ? For example...
step1: A from is filled out by a user, then they click the submit...
|
by: Kevin Lyons |
last post by:
Hello,
Can anyone assist me with what I am trying to do with the following
code (six different scenarios to try to make the functionality work
correctly)?
I want to always (and ONLY) display...
|
by: charlie_M |
last post by:
I figured out via various help from this forum...
EXAMPLE:
onClick="document.forms.MYBUTTON.value='SIMPLE';document.forms.submit()"
In my CGI I see "MYBUTTON" = "SIMPLE"
and this works...
|
by: BTHN |
last post by:
Hi everybody!
I have a webfrom contains a datagrid with a bound column(contains
names) and a button column. I want when we click the button, a new
windown open and display some information for the...
| |
by: Navillus |
last post by:
Hey gang,
I have a login form that is empty by default, but can be filled with
values from a previous form:
<input type=text maxlength="40" size="40" name="user" value="`usr`">
<input...
|
by: d3vkit |
last post by:
I have a form on my page, and some javascript which uses ajax to submit the form, and then opens the new page in a div using ajax so there is no refresh. This works fine. But the problem is this: all...
|
by: sravan_reddy001 |
last post by:
i want to prevent a form from closing..
to do this i want to handle the formClosing or FormClosed events.
from here i want to prevent the form from closing.
New instance of same form should...
|
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: 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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |