473,609 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing parameters to Javascript Popup window

53 New Member
Hi,

I have written the code for display popup window using javascript in button onclient click event.
Expand|Select|Wrap|Line Numbers
  1.    <asp:Button ID="Button1" runat="server" Style="position: static" OnClientClick="openwindow()"
  2.                 Text="Execute"/>
  3. <script type="text/javascript">
  4. function openwindow()
  5. {
  6. window.open("AssignedTickets.aspx",'window','width=630,height=620,background=silver,menubar=no, resizable=no')
  7. }
  8. </script>
And I want to pass parameters to that popup page because there are some search parameters i need to pass those to popup page and display the results in popup page.
Please anybody help me how to pass parameters to popup window using javascript.


Thanks in Advance
Pavani
Feb 24 '09 #1
3 7703
acoder
16,027 Recognized Expert Moderator MVP
It could be as simple as:
Expand|Select|Wrap|Line Numbers
  1. window.open("AssignedTickets.aspx?par=val&par2=val2",...
PS. please remember to use [code] tags when posting code.
Feb 24 '09 #2
pavanip
53 New Member
I used this statement to pass values
var param1 = document.getEle mentById('textB ox1').value;
but it dost not passing anything i am getting null value.
Can you tell me the exact syntax to pass values?
Feb 24 '09 #3
acoder
16,027 Recognized Expert Moderator MVP
Ah, in that case, you would use:
Expand|Select|Wrap|Line Numbers
  1. window.open("AssignedTickets.aspx?param1="+param1,...
To avoid possible problems with special characters, you may want to wrap 'param1' with encodeURICompon ent().
Feb 24 '09 #4

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

Similar topics

3
4339
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"); }
29
4990
by: wayne | last post by:
Hey there... I'm having some problems passing url parameters with an open.window command. I'm not terribly familiar with java script but here is the code below. When executed it opens the window properly but does not pass the parameter. (this is part of a coldfusion template) <a href="##"
1
4983
by: Paul D. Fox | last post by:
I'm trying to launch a Child Window from a hyperlink on a Datagrid and have it recieve multiple values from the Parent Window. Upon recieving the values in the Child Window, I need to access them in the code-behind so I can render a datagrid in the Child. I've tried just doing another Postback in the child's onLoad event but I get a Javascript error. Is there another way to do this? <%@ Page Language="vb" AutoEventWireup="false"...
3
4060
by: Aaron | last post by:
I am having a little difficulty with a relatively simple task. I have a parent webform. I have a javascript attribute added to a button to open a new window when clicked. The user fills in a textbox then clicks the button and on page load the child window should grab that val run a query an present the results. Given that I am bouncing between server side controls and client script. I am just having a little trouble passing my textbox...
5
2417
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
8
1898
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
5444
by: DaveyP | last post by:
I've got a gridview with a template column calling a javascript "win.open" routine (see below). asp code: <asp:TemplateField HeaderText="Letter code"
5
18179
by: TurboRogue | last post by:
So here's the basic premise: I have an html page with a bunch of pictures (pic.html). All of the images are thumbnails of larger photos. I also have another html page which is a pop-up window essentially (popup.html) (it's a standard html page that I've set to a smaller width/height by using javascript). The popup.html page has 2 divs in it, one with the area that I'm trying to populate dynamically with the full size image of the link that...
12
37811
meenakshia
by: meenakshia | last post by:
hi forum i have read a lot of articles regarding passing data from popup to parent up but i m looking for the opposite that is from parent to popup window pls help me in this regard i have three input fields in parent window and three in popup window parent.htm
0
8115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8513
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
8205
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
8380
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...
1
6047
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
5504
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
4066
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2519
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
0
1374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.