473,763 Members | 9,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing a variable to a popup

21 New Member
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:
BPQUxVjl4taQoI4 Op0vt6w/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 2809
Dormilich
8,658 Recognized Expert Moderator Expert
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 New Member
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 Recognized Expert Moderator Expert
@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
4345
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) { window1=open("solution.php?folder=folder1&file=file1"); }
6
7094
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 with the related description. This is done and is obviously not a concern. However, now I would like to make it so the corresponding row becomes highlighted (changes background colour via DOM). I imagine it can be done, but I'm at a loss for...
3
3456
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 am wanting to then use this value within an element of a form on the current page -
13
2519
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 Error GoTo err_zoom strFormName = formName
5
2424
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 variables value needs to be passed from the main page to this popup window ... but it isn't. why? the submit button one the PHP page is
5
1736
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 document.getElementById: var variable = document.getElementById('txtBox).value; But if the control is hidden, that javascript code generates an error. Can this be done with properties? Thanks.
8
1906
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 URL. To select the url , the user can click on a browse button to open a url chooser pop up ('page2'). I want the url that is selected in 'page2' to be posted back to 'page1' and displayed in the input box, without losing the values a user has...
1
3749
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 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
10
11901
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", after the popup closed, then from parent window, we can use alert(var_from_popup) and it will show us the "abc"?
0
9387
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,...
0
10002
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 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...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9823
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 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...
0
8822
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7368
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 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...
0
6643
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
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...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.