473,414 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Passing a variable to a popup

21
Hi guys

I thank you for being the most helpful and responsive tech group around, and I have a new one for you.

Have you ever embedded Hulu on a page before? I use it quite extensively in popup "player" windows, and as each popup page requires slightly varied object/embed parameters specifying to which Hulu file to link, I've been creating a different HTML page for each popup. Now however, I face creating a multitude of individual popup pages, when the only thing that really changes on each one is the that one simple variable that's part of the basic object/embed code as shown below.

Could I not write the variable parameter into the embed code as the popup opens so that I can use just one landing page?

Here's an example of the basic Hulu embed code:

Expand|Select|Wrap|Line Numbers
  1. <object>
  2. <param name="movie" value="http://www.hulu.com/embed/BPQUxVjl4taQoI4Op0vt6w/174/208">
  3. </param>
  4. <embed src="http://www.hulu.com/embed/BPQUxVjl4taQoI4Op0vt6w/174/208" type="application/x-shockwave-flash">
  5. </embed>
  6. </object>
The only variable that actually changes from clip to clip is this part:
BPQUxVjl4taQoI4Op0vt6w/174/208

How can I write the object/embed code into the popup page, including the appropriate variable, based upon which href link is clicked?

To see it in its current form, just select an episode from the dropdown:
http://www.airwolf.tv/welcome.html
Jul 30 '09 #1
3 2786
Dormilich
8,658 Expert Mod 8TB
you can pass that string by url and in the html file echo its value out
Expand|Select|Wrap|Line Numbers
  1. // something like that
  2. <param name="movie" value="http://www.hulu.com/embed/<?php echo $_GET['param']; ?>">
you could also improve the php code further to protect against any kinds of hacking attacks though...
Jul 30 '09 #2
Wolfman
21
Thanks - but how would I write the url string? I assume the popup page itself would need to be php, while keeping the master page HTML.
Jul 30 '09 #3
Dormilich
8,658 Expert Mod 8TB
@Wolfman
yupp.(although you can have the master page in php too)

Expand|Select|Wrap|Line Numbers
  1. // maybe you need to urlencode the "/"
  2. hulu.php?param=BPQUxVjl4taQoI4Op0vt6w/174/208
Jul 31 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Raju V.K | last post by:
can I use javascript and PHP in the following manner to create a pop-up window: <--- in <head> </head> <script language=javascript> function popup(folder1, file1) {...
6
by: veganeater | last post by:
Hi Everyone, I was wondering if there was a way to pass a variable to a popup window. The purpose is make it so when a user clicks on a specific region/link of the glossary page, a popup opens...
3
by: michael | last post by:
let me keep it clean, quick and simple. I am passing a variable into another window and am reassigning the value on the new page - window.document...value = opener.document. ....value and...
13
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On...
5
by: Steve | last post by:
Hi, I currently have a problem passing a variable value from one page to another. Once a form submit button is pressed java pops up a window and displays some information. The problem being is...
5
by: VMI | last post by:
How can I pass variable or Property values from my popup webForm to the webform that opened this popup? For information that's in a control (i.e. Textbox), I'm using javascript and...
8
by: JJ | last post by:
Whats the best way to pass a variable from a popup to the current page (without a postback on the current page). I have a form on 'page1' with various text input boxes. One box contains an image...
1
by: Wolfman | last post by:
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...
10
by: perhapscwk | last post by:
how to passing value from popup to the parent window as a variable which I can access and process the variable(string) in parent window? such as from popup page, we have var_from_popup="abc",...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
isladogs
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...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.