Hi gang!
I've been searching for a solution to this problem extensively but nothing really hits the mark.
I have a descriptive popup page that contains a PayPal order button. The normal PayPal form fields allow for the item description, fee, etc. I'd like the fee field to be variable based upon which hyperlink launched the popup.
So,
HREF click sets a variable
INPUT TYPE (hidden) named "amount" equals the variable
Specifically, the page that has been launching the popup is a standard order page. I'm adding a discounted "sale" page which would lead to the same popup description, but since the PayPal code is absolute, the user would end up paying the standard price if the click the popup's button.
I'm trying to avoid creating separate popup pages because there's already one for foreign and one for domestic, then two of each of those for each issue.
Here's the relevant code:
REFERRER PAGE
<A HREF="javascrip t:newWindow1('i ssue01dp.html') ">Issue 1</A>
newWindow1 is defined in an external popup function.
POPUP PAGE PAYPAL FIELD
<input type="hidden" name="amount" value="9.50">
So, for example, one hyperlink would make the "amount" equal 9.50, and another hyperlink would make the resulting "amount" equal 8.50.
I'm thinking that if I could embed a number in onClick=, then call it within the form field, that'd do the trick. But I'm stuck trying to find a simple way to define the variable within this one line.
1 3731
Hi,
Here is what you can try.
In the first page you can have the below onClick function in the anchor tag - onClick="window.open('popUpPage.html'+'?'+escape(1.5),'_blank')"
1.5 is the value you are passing to the popup page.
In the pop up page you should have a onLoad function which includes this code - var val = unescape(location.search.substring(1, location.search.length));
now val is going to have 1.5 and you can use this in your popup.
Is hope this is what you are looking for
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Paul |
last post by:
I want to use sessions to cover myself in case the user switches off cookies
so I am passing the session ID manually through a hidden input field. This
is what I have so far.
index.php page contains:
<?php
$_SESSION = "";
$_SESSION = "";
|
by: Paul |
last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and
session.use_trans_sid = 1 in my php.ini file. Index.php contains:
----------------------------------------------------------------------------
<?php
ini_set("session.use_cookies", "off");
ini_set("session.use_trans_sid", "on");
session_start();
$_SESSION = "";
$_SESSION = "";
echo "<form method='POST' action='login.php'>
|
by: Robert Rozman |
last post by:
Hi,
I'm total php newbie and probably have trivial problem.
I have following two scripts. First creates web form and should run second
script with two arguments. But those two arguments don't get to second
script, cause this line
print "Please enter both phone number
and name!";
|
by: Newbie |
last post by:
OK, this may be impossible since I'm using 3rd party shopping cart ASP
software, but I've been able to finagle a lot of other stuff I thought
wouldn't work, so here we go:
I'm using a form in which users enter numbers to be calculated into a square
footage cost. Upon submitting, the results page uses ASP to give the total
and the chance to add the new totalled item to the cart or try a new
calculation. Part of the cart's software has a...
|
by: BigDadyWeaver |
last post by:
I am using the following code in asp to define a unique and
unpredictable record ID in Access.
<%
'GENERATE UNIQUE ID
Function genguid()
Dim Guid
guid = server.createobject("scriptlet.typelib").guid
guid=Left(guid,instr(guid,"}"))
genguid=guid
| |
by: JA |
last post by:
I have this little tell-a-friend script that will send out a link back to
the site. I want to put a link on my product pages that will go to the
script, and have the script display the product name, and have the product
name in the email that goes out, along with a link back to the product page,
instead of just to the general site, and then have the Thank You page
include a link back to the product.
I put it up as a project on a...
|
by: Jack |
last post by:
Hi,
I need to pass multple variables in a link in order to go to a asp page with
the
two varables.
The following are the values of the variables using response.write:
<%'Response.Write Mypage & "<br>"%>
Exp
<%'Response.Write GrantID & "<br>"%>
|
by: milo1955 |
last post by:
I have a form that passes a single variable via the GET function to a mysql databse query with the results paginated. The first page of the results work fine, but the link to the second page yields the page 2 results of the entire table. I'm guessing that the variable hasn't passed to page2 query? Please excuse my ignorance. Here's my code:
<?php
//where $rory is the variable that is passed via the form with the GET action
$page = $_GET...
|
by: EyeHawk |
last post by:
I’m fairly new on ASP and Javascript programming, I have read as much as I can to develop my website in a user friendly manner. I’m using javascript to pass some values in a Form, but is no working, I have tried to research, but being such a specific problem I haven’t being able to find any answers. Hope Somebody Can Help Me or put me in the right direction. Thanks in advance.
I have a form and when clicking on an image all I’m trying to do...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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: 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: 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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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.
| |