Passing Variable To Popup

Oct 4, 2006

I've perused the posts on popups and variable and can't seem to get what I need. Can someone take a look at my code and tell me what I'm missing.

I want to open a popup window and provide a variable that I grab from a select list on the main page using javascript. This code works to grab the selected option in the list and open a new page but I want it to do this in a pop up so I can still see the main page.

HTML Code:

View 1 Replies


ADVERTISEMENT

Way Of Passing Variable From Parent Window To Popup Window

Jun 27, 2002

I need the most efficient way of passing a variable from a parent window to a popup window.The reason i say "most efficient" is because i currently do it like this from the parent:[code]But this is inefficient because at times it randomly alerts "undefinded".Anyways, can someone tell me a more fail safe way to pass a var to a popup so that i will be able to access it 100% correctly.

View 1 Replies View Related

Setting Variable Equal To Php Variable By Passing A Parameter?

Aug 12, 2011

Code:I am having problems with the following. I am wanting to hide <tr> in my table (employees) and only show employees that are in the selected department (selected via dropdown box).I need to set a javascript array to a php array. I am looping and assigning the array and am wanting to pass a javascript variable as the index in php array. I have marked my problem lines in red. Thanx for any help.

<script type="text/javascript" >
function display_elements()
{
var departments = new Array;

[code]....

View 1 Replies View Related

Passing A String To A Popup

Dec 21, 2005

I want to popup a page, but I want to send a string through to the
popup. Then I want to set a multiline Textbox on the popup equal to that
string.

View 2 Replies View Related

Passing Url Vars And Popup?

Jul 22, 2009

This sends variables to the page okay (on a version without the onClick, opening a normal page).

Problem seems when onClick is added: where the # would normally be following the url to open the popup from colors.htm

PHP Code:

if ($row_results['Mcolor']> 2) {echo'<a href="http://www.mysite.com/colors.htm?UsrID='.$row_results['UsrID'].'" class="linebar" onClick="MM_openBrWindow('../s/shades.php','','status=yes,scrollbars=yes,width=620,height=450')">more</a>';} 

Is there always a conflict between javascript and php when sending vars since javascript is client side and php is server side? Is there another way to size the opened page, for instance, on... /shades.php itself? - Only doing the popup for this reason.

Inserted this in head of the destination page; shades.php itself, but not as a function. Might there be a way to activate this when the page loads, without onClick of a button from prior page?:

Code:
<script>
windowresize.To(400, 600);
</script>

View 7 Replies View Related

Passing Variables To A Popup Window

Aug 31, 2005

<a href="view_details.php"
onClick="window.open('view_details.php?id=<?=$row['id'];?>&sname=<?=$row['sname'];?>')">
details</a>


Have got this so far but need to get the width and height set. Cannot seem
to get he syntax right.

View 1 Replies View Related

Passing A Reference To The Popup Window

Nov 23, 2005

Is there a way, I could pass the reference to a pop up window to
another function?

Basically, this is what I want to
var win= window.open("x.htm".....)

SetValue(win,"txtName");

//-------------------------------------------
function SetValue (win, ctlID)
{
var obj=win.getElementByID(ctlID);
ctlID.value="Hi";
}

View 1 Replies View Related

Passing Variables To Popup Window?

Feb 28, 2009

I want to pass variables to pop up window.How can i do this.

The code to pop up new window is as follows

<td id="add" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor='#EFEFEF'" onMouseOut="this.style.backgroundColor='#FFFFFF'"> <a href="http://172.16.0.145/zm/index.php?view=monitor "

[Code].....

basically i want to pass values of "xcoord" and "ycoord" to pop up window.

View 1 Replies View Related

Passing Value From Popup To Parent Window

Jul 1, 2009

All three values are received at the JavaScript function. Have problems in translating and passing it to the parent. Trying to do the following from popup

<a href="#" onclick="javascript: post_value('<%=key%>', '<%=val%>', '<%=callingElement%>');"></a>
function post_value(partNumber, partDesc, callingElement){
opener.document.caseLineupDetailForm[productNum[callingElement]].value = partNumber.replace(/`/g, "'");
self.close();
}
[Code]....

View 1 Replies View Related

Passing Parameter To A Popup Window Without Using Querystring

Jul 20, 2005

I have a search page im asp.net. the user enter the criterias in
textboxes and dropdownlists and on submit i want the results to be
displayed in a popup window.

so the easy way is to pass the criterias in a querystring to the new
window. but if it's possible i don't want to use query string.

in asp, i could use the folowing:
i open a temporary blank window, on load I take the values of the search
page using the window.opener and submit them to the server.
Unfortunately this can't be done in asp.net coz window.opener isn't
working.

so is there a way to do that ? or the only way is to pass the parameters
in a querystring ?

View 3 Replies View Related

Passing Values From Popup Window To The Many Page

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

Passing Variables From A Popup To Main Window

Jul 24, 2004

I have two PHP scripts. The popup script (calendar.php) is linked from the main navigation of the website. When it is clicked, the calendar popups up and the dates are linked. For example; the 24th July 2004 would read: events.php?day=24&month=7&year=2004

However, I require this information to be passed back to the MAIN window so that it can be displayed in a full screen.

View 6 Replies View Related

Passing Variable...

Jan 23, 2006

I have a form like this:

<form name="dane" action="wyszukiwanie.php" method="post"
verify_form()">
<input maxlength="30" size="35" name="family_name" value="">
</form>

Now, How can I pass a value from this input to my js script verify_form() ??

And second question: if I have "radio" input im my form how can I check
using js if any option was chosen?

View 1 Replies View Related

Passing A Url Variable?

Sep 22, 2009

What I need to do, and it shouldn't be that difficult is this:page1.html - there is a yellow button and a red button - if the user clicks on the yellow button I want to set a cookie with the value "yel" then load the next page - if they click the red button set that cookie with the value "red"page2.html - 'onload' i want to read that cookie and load up the main image to match, something like this maybe?...

document.mainimage.src='img/main_' + variable + '.png'so that the path would be for example 'img/main_red.png'Any help please? Preferably javascript only and as simple as possible. If you think this would be easier sending that variable in the URL instead of as a cookie.

View 1 Replies View Related

Passing A Variable Into The DOM?

Nov 3, 2009

I think this is what I am trying to do, I am pretty new to javascript so I'm not sure... but here is my question... I got this function below.

function getProductInfo(id) {
var sku = window.document.InvoiceForm.Item0Sku.value;
alert(sku);
}

when I use the 0 I get the right value back, however whenever I try to pass it the id variable with a value of '0' I can't seem to compose the concatenation correct in order to recieve the correct value.I either recieve errors or the whole window.document.InvoiceForm.Item0Sku.value string back in the alert, what am I doing wrong?

View 3 Replies View Related

Passing Variable To ASP With Javascript

Jul 20, 2005

I have two events in a form that I am passing. One is to a javascript
function, the other is to the same .asp page only with another action
to show different data.

Onchange is calls the function updateclasses, which in turn reloads
another drop-down list. It also reloads the .asp page, which
refreshes the data. My problem is that it refreshes the second
drop-down briefly, until the page reloads, but then resets the form.
How do i pass this data to the .asp?

I thought in the .asp, I could just do something simple like the
following, but wasn't sure of the correct syntax. is there a better
way?

view = request.querystring("view")
if view = "" then
view = "SciLink"
else
%>
<script language="JavaScript">
updateclasses(form1, 0, Student)
</script>
<%
end if

.........

View 7 Replies View Related

Passing Value To Global Variable?

Mar 15, 2009

I have a site that calls the function welcome() and displays a prompt. The same site also has an iframe that calls the next function, add_name(), but when the pages are loaded it says that "answer" is undefined.It says on the page, where the <p id="guest"></p> is, "Welcome undefined". How do I make it so that the value of answer, which is given onLoad of the 1st page with the prompt, is displayed as text in function add_name()?

[CODE]
function welcome(){
var x = document.getElementById("body");

[code]....

View 4 Replies View Related

Passing Variable In Onclick?

Apr 2, 2009

Basically, I have a form with some text fields, and I want to put a button next to each text field, so that when a user clicks on the button, it increments the value in the field by 1. I know how to do it if I know the id of the text field, but what if the id of the text field is a variable? How do I do it? Here's my code:

<script language=javascript>
function process(v){
document.getElementById('order_item' + v + '_quantity').value++;

[code]....

My issue is with my onclick statement:

<input type="button" value="Add +" onclick="javascript:process(0)">

This works fine for my first field, but I need to have one for every text field, so how do I pass my counter variable (which determines the id of the appropriate text field) to the process function?

View 7 Replies View Related

Passing 1 Variable Containing 3 Parameters?

May 14, 2009

myfunction(a,b,c)
{
do something;
}

[Code]....

passing 1 variable containing 3 parameters?

View 2 Replies View Related

Passing Js Function Variable For Id

Aug 14, 2009

I am having trouble passing the correct id to change the innerHTML. I have a jsp that display people and their address information. There could be several people in the list, so it is in a loop. That part all works good. There is a drop down list with countries in them. Based on the country they select, I want to change some of the text. Here is what I have:

<tr>
<td class="datashaded" valign="top"><font size="2"><b>Country:</b></font></td>
<td class="datashaded" valign="top">

[code]...

When I hardcoded the id= value, not matter which group I changed the country on, only the first one was changing, so I knew I needed unique ids for each group. There is more to the table, but this is the good part. When the onChange fires now, Nothing at all happens.

View 3 Replies View Related

PHP Variable Is Not Passing Properly?

Sep 8, 2009

Here's something that I tested without the PHP and it worked ok. Now that I've introduced the PHP to the document it doesn't work. The PHP variable is not passing to Javascript properly. By use of some cleverly placed alert boxes, I figured out that the only thing that is getting passed forward is something called : "object HTML ImageElement"

Specifically, I assign the element ID the unique ID number of the record in the SQL database. The problem isn't with the ID numbers themselves: They are alphanumeric and unique.I think it boils down to one of two lines of code. Either this isn't working (about line 12)

function expander(RecordID){

or perhaps it is when I am calling the function (about line 66):

echo "<img id='".$row['IDNumber']."' src=".$row['ImagePath']." width='5%' onMouseOver='expander(".$row['IDNumber'].");' onMouseOut='shrinker(".$row['IDNumber'].");'>";}

The PHP works (I can get the images to appear, so the connection to SQL and such isn't a problem). I am sure most of the JavaScript is good, too, as I said I had it all working prior to dropping in the PHP.Since I am not going from JavaScript to PHP I don't think I need AJAX. I just need the PHP to pass to JavaScript.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">[code]....

View 5 Replies View Related

Passing A Parameter With The Value Of A Variable

Sep 15, 2009

I've been staring at this same problem for over a week now. I've worked around it as best as i can but i think it's time to ask someone else for input.

I'm trying to pass a value thru an ajax parameter.. that's all. it SHOULD be easy in theory.

What i want to do is create a jscript variable then pass that variable as the value for a parameter.

Php then converts that value to something it can use to finish the rest of my code.

As i said it's hindering my webpage progress and i would like to get it fixed soon.

View 13 Replies View Related

Passing Variable To PHP Code?

Apr 19, 2011

I have the following code, where I am inputting a word and on clicking the button , i am setting the value of the text box in div class="twit" which is hidden.now I have to access the value of this hidden text box (name=q) using php.Say I want to print using php .How do I do this ?

<html
<head>
<title></title>

[code]....

View 6 Replies View Related

New Function Variable Passing?

Apr 22, 2011

I have a function which is currently called twice on the same page. Part of the function is to apply an onkeyup event to a created element. The problem is that when the function is called twice the first created element calls the onkeyup function of the second element!

table_JD.length-1 = 0 for first element
table_JD.length-1 = 1 for second element
updateSearch_TC_JD(1) is somehow called from first element!
newSearchBox.onkeyup = function() {updateSearch_TC_JD(table_JD.length-1)}

View 3 Replies View Related

Passing A Variable From HTML?

Sep 12, 2011

I have two versions of this document. The first version uses only JavaScript and the standard PROMPT(). It works very well, but I would like to insert the name prompt into the page using the input command. For some reason the variable loaded in the HTML statement doesn't get passed to the JavaScript. Any ideas would be appreciated! This is only a small test page. Sorry I don't know about the [code] tag...

<!DOCTYPE html>
<html lang="en">
<head>

[code]....

View 1 Replies View Related

Multiple Variable Passing To Php?

Aug 2, 2011

i wanted passe multiple variable to php file from get methode

here is the code
<div onmouseover="show(document.getElementById('link<?php echo $cmId.$poId?>'));" onmouseout="hide(document.getElementById('link<?php echo $cmId.$poId?>'));">
<form> <?php echo $row['comment_cm']?><br><a href="editComment.php?
var1=$cmId&var2=$poId" id="link<?php echo $cmId.$poId?>">Edit</a>
</form>

[Code]...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved