473,484 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Create 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 7697
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.getElementById('textBox1').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 encodeURIComponent().
Feb 24 '09 #4

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

Similar topics

3
4328
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) {...
29
4954
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...
1
4956
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...
3
4050
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...
5
2400
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...
8
1888
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
5439
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
18173
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...
12
37763
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...
0
7103
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,...
1
6809
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...
0
5403
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,...
0
4527
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...
0
3044
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...
0
3038
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1355
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 ...
1
587
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
234
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...

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.