Returning Multiple Values From A PopUp Window?
Jan 25, 2010
We use .mac's to create some of our Web content where we also use some javascripts. We have numerous prompts where we have a button for the user to click on that brings up a new prompt window where they type in a search name like, TIE, to search for all ties available to select from.
After typing the search name, the same window displays a list of selections to choose from. When they select the desired item and click the continue button, the window closes and we return the item number to the calling program.
What I would like to do is bring back more than one variable. For example, instead of just, 1234 in Fld1, I would like to return, 1234 into Fld1 and B into Fld2, where Fld2 will not be displayed but needed elsewhere.
For this made up example, these codes could stand for... 1234=Tie and B=Blue. We may use 1234 for all ties and have a second field to further define it.
The code I have always used in the past will just bring back the 1234, I am asking how to return the B also?
Here is some of the code I currently use:
This displays the button they click to bring up the pop-up search window...
<tr>
<th Align="Left" BgColor="LightSteelBlue">Item#</th>
<td colspan="3">
<input type="text" size="5" MaxLength="5" name="choiceItem" value="$(choiceItem)">
<input type=button onClick="window.open('/member/Item_Lookup_Both.mac
[Code]....
View 3 Replies
ADVERTISEMENT
Jan 24, 2011
I want to open a aspx page as popup at a button click with some text box values being passed toit. Also need to display data in a grid in popup and then when a row is selected send that data back to parent .
View 1 Replies
View Related
Sep 21, 2005
I have a simple popup launching off a picture link. But the origional page wipes and display a 'false'.
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=800,height=600,left=100,top=100,scrollbars=NO');
return false;
}
//-->
</SCRIPT>
The command is simply
<a href="javascriptopup('home.htm')"><img src="logosparty.jpg" border="0" width="360" height="215"></a>
View 4 Replies
View Related
Apr 6, 2006
I'm just starting to try out "Ajax" web programming and I've got a question.
AJAX is fairly straightforward. Javascript creates an XMLHttp object and
then uses that to generate a hidden webpage with your results.
What I'd like to know is, how can I retrieve multiple values from an XMLHttp
request?For example, if my request generated an SQL query that returned a
Name, Address and PhoneNumber, could I get those values directly instead of
parsing them out of the ResponseText?
This is my current handler:
function showResult(pge) {
var url="getResult.asp?sid=" + Math.random() + "&q=" + pge
xmlHttp=GetXmlHttpObject(stateChanged)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
}
function stateChanged() {
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
//Complete, so show results.
document.getElementById("myResult").innerHTML=xmlHttp.responseText;
//How to get mulitple values here?
}
}
View 3 Replies
View Related
Jan 19, 2003
how I can populate the value of an input field on a parent window from a selected item (of a form - listmenu) on a pop-up window? Basically, I need to pass the value of one form to another form located on a different page...
View 1 Replies
View Related
Feb 5, 2010
<p>i WANT TO DISPLAY THE POPUP WINDOW AFTER CLICKING THE PARENT WINDOW "BUTTON".<p><p>THAT POPUP WINDOW DISPLAY THE DATA IN A TABLE FORM(FOR EG:NO,NAMEETC.,) .<p><p>Now i want to select any row in the table using radiobutton.After selecting the radio button particular row values will display in parent window text boxes.</p>
View 1 Replies
View Related
Dec 30, 2007
Suppose that I have a main page with a link that opens a popup window which has a link with a parameter and I want to pass the parameter to a text input in the main page,
how to do that?
View 2 Replies
View Related
Mar 24, 2006
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 fields to be validated so the popup won't
close until both text boxes are filled in.
So far I have used the function from javascript.internet.com in the
header of the original page. I have tried to make so that when the
first popup closes the second popup will open. I can get the variables
to pass the main page but I feel it would be more effecient to have
both text boxes in the same popup instead of having two. Code:
View 2 Replies
View Related
Mar 27, 2007
I am trying to turn all the bullet points Li id values so i can store them.. I have written the code below but all this does it return the number of li's, everything i have done to bring out the id of the li, it fails. Code:
View 2 Replies
View Related
Sep 1, 2011
My getElementsByTagName ("a"); is not returning anything. (well it's returning "0" not the value I should be getting) I'm asking it to find the number of links on my simple html page. (the reason I'm even doing this is just because I'm trying to learn javascript) but the console in Firefox and the Alert window are just returning "0" when it should tell me I have "4" right?
the files are both located in the same folder, locally
this is my scripts.js file
Code:
var linksAmount = document.getElementsByTagName("a");
alert("Amount of Links:",linksAmount.length);
console.log("Amount of Links:",linksAmount.length);
and this is my html file (it's very small)
[Code]....
View 2 Replies
View Related
Mar 23, 2009
From the code given below, I think it's pretty obvious what problem I'm having, but I'll explain:
Javascript is only returning HTML DOM attribute values when they are assigned by the javascript function, not when they are assigned by CSS. So, if I set the background colour of a div using CSS, then try to call that attribute value, JS doesn't return it, BUT, if I then assign a new value using JS, it can correctly read the attribute value.
What am I doing wrong? Or can javascript not pull HTML DOM attribute values assigned by CSS?[code]...
View 2 Replies
View Related
Aug 28, 2010
im having a problem with returning the value of a custom prompt box function . and stopping anything from happening while the prompt is open... the problem is with the
Code:
alert(prompt('please enter your name'))
at the end
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<style type=text/css>
[Code]....
View 4 Replies
View Related
May 27, 2011
I'm doing some jquery and ajax work with C# asp.net MVC on the server.
I have this JS function:
function DeleteListing(receiptItemId){
$.ajax({
url: "DeleteListing",
type: "POST",
[Code].....
What I'm wondering is there ways to return values from DeleteListing on the server to the success function?
View 4 Replies
View Related
May 28, 2010
jquery width() and height() functions are consistently returning the wrong values for the viewport size (i.e. $(window).width). Anyone know why..or what I can do to fix it?
View 3 Replies
View Related
Dec 13, 2007
I'm using height() and width() to find the dimensions of some inline images in the html. FF and IE work fine, but Opera is returning incorrect values. For example, it returns 92px as the width of an image that is actually 160px wide. How can I fix this?
View 4 Replies
View Related
May 25, 2006
This is my first post to this forum. When a button in parent window is clicked multiple times, more than one popup window is opened. This problem is occurring in linux firefox and mozilla browsers. In windows the code is working fine. Is there any option in window.open() method to open a popup window once. s there any known issue regarding this case?. Need a workaround to fix this issue.
View 1 Replies
View Related
Jan 22, 2010
I am trying to dynamically open a popup window but ie8 blocks it with the popup blocker. basically within a ajax fuction I have a confirm button and if the user clicks yes it opens a popup window. now I tried it with a javascript function but it got blocked, so I have tried it by creating a form with a button in it and instead of calling the popup function direct I call document.form.button.click and in the form my button has onclick"popup('<? echo url; ?>')" but this also is detected as a unwarranted popup and is blocked.
now I understand that the popup blocker works when a popup is called without user interaction, but allows popups on say button clicks. how can I get the popup to work
View 3 Replies
View Related
Sep 22, 2010
In my application i use window.showmodaldialog() to pop up a window. When i run it in IE pop up blocker wont blocks the window... But when run it in FireFox pop up blocker will blocks the pop up window.. is there any way to open a window with out blocking(avoiding ) by the pop up blocker?
View 1 Replies
View Related
Jul 19, 2011
I have a list of products where they have minimum quantities in a hidden input. Some products have multiple colours, though the same minimum quantity and I'm trying to implement a jQuery check that entries made are at least equal to the minimum.
Blank or '0' entries are fine but if it's below the minimum quantity it should set to the minimum.
HTML:
Is there something obviously wrong with this? It isn't performing the minimum check and I'm really not sure why.
View 1 Replies
View Related
Jun 5, 2009
i have a form, and for the user to upload a file, i use window.open with my upload script. however, after the file is uploaded, i want the filename to be put back on the original page in an input text field. how would i go about doing this?
View 1 Replies
View Related
Mar 19, 2009
I am setting up a text search with 3 search buttons to allow 3 different searches from the one text box. Each search has different values for the 2 hidden elements. So far I've got the 3 submit buttons working with the below code but I can't figure how to get the hidden values to be inserted. For each of the 3 different submits I need to tell javascript what the 2 hidden values are.
<SCRIPT language="JavaScript">
function OnSubmitForm()
{
if(document.pressed == 'questions')
{
[Code]....
View 4 Replies
View Related
Jan 8, 2004
I have a popup window which has the search form in. What I want to do is for the popup window to close once the form is submitted, and to post the form data to a page on the main window.
Is anyone able to advise. As the main page is dynamic, it is not possible to give the page a name.
View 4 Replies
View Related
Jun 13, 2011
Im trying to create a hidden form field in a parent window from within a child window (popup). I am trying to use jQuery, but unfortunately the hidden field does not get created.
Code JavaScript:
View 2 Replies
View Related
Jul 20, 2005
I have a couple of utility windows - a calculator and a calendar that popup
from my main window. I would like them to always stay in front of the parent
window until they are shut down with there own close buttons. As it is, when
you click back to the parent window, of course it comes in front of the
child windows. Can I do this?
View 4 Replies
View Related
Apr 7, 2007
My problem is that ..... I have to select Data from Popup Window and get that Data back to my Parent window's textarea field..
View 2 Replies
View Related
Sep 23, 2010
I need to open a popup window from a PHP site and pass in some parameters to use in the pop up window. I have the params in an input box and need to get the val of the box into a param and pass it to the new popup window. All pages are local and in the same folder. The id of the input box is 'ddutykey'. The name of the new window would be showduty.php if possible.
View 3 Replies
View Related