473,804 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send a parameter with window.open

Hello!

I am very new to javascripts and wonder if there are any ways to send a
parameter from a javascript with window.open.

My java code is like:
<script language="JavaS cript"> function openpic(picid) {

window.open("Pi cContainer.aspx ","","width=450 ,height=400,lef t=180,top=10");
} </script>

As you see I have the picid as a parameter. Tried to add it as
PicContainer.as px?ID=" & picid
but it didn't work.

Is it not possible to put an httpstring variable in the url this way? How
could I solve it?

Regards Magnus
Nov 18 '05 #1
2 5399
for javascript you have to use + not &
<script language="JavaS cript"> function openpic(picid) {

window.open("Pi cContainer.aspx ?ID=" + picid
,"","width=450, height=400,left =180,top=10");
} </script>

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Magnus Blomberg" <ma************ *@skanska.se> wrote in message
news:ui******** ******@TK2MSFTN GP10.phx.gbl...
Hello!

I am very new to javascripts and wonder if there are any ways to send a
parameter from a javascript with window.open.

My java code is like:
<script language="JavaS cript"> function openpic(picid) {

window.open("Pi cContainer.aspx ","","width=450 ,height=400,lef t=180,top=10"); } </script>

As you see I have the picid as a parameter. Tried to add it as
PicContainer.as px?ID=" & picid
but it didn't work.

Is it not possible to put an httpstring variable in the url this way? How
could I solve it?

Regards Magnus

Nov 18 '05 #2
Thank you, it worked!!!

Best regards
/Magnus

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
32661
by: BadOmen | last post by:
I want my program to send a mouse click to the window at the current mouse position, how do I do that? Example: I have my mouse over a button in Word and then my program is sending the left mouse click and the button under the mouse is clicked. Yours, Jonas
5
2990
by: john woo | last post by:
Hi I'm wondering how to open new window with parameter in URL. like if the new page URL like url="http://.../a.jsp?a=value" I've tried in javascript function window.open("url",...) or window.open(url,...)
0
1976
by: CLarkou | last post by:
My program in Access (Office 97/2000/XP/2003) opens a database (MAIN MENU) with a listing of all databases in a directory. User selects what database wants to open, and program opens it. I am not just reading data from it, I open/run it and forms created in it, can be used by user (MAIN MENU closes). From MAIN MENU I have the following for opening a specific database: SendKeys "%F{DOWN}" 'ALT F SendKeys "{ENTER}" 'Open Window opens
2
1921
by: bhav | last post by:
Hi Guys, I have a Web Forms' 'Table' control in my default.aspx page, along with other controls. I wanted to implement a functionality where a user can click a button to open the table's contents in a new page/window for printing. Is this possible. I was thinking about using Server.Transfer, and passing data via Context.Items collection. First, it doesn't send any data to the page, and second, it opens in the same window. I...
3
1832
by: Lars Netzel | last post by:
Hello! I have a button, in the click event I have this code: ---------------------------------------------------------------------------- ---------------------------- Response.Write("<script language=javascript>window.open('CrystalReports.aspx?FromDate=" & txtFromDate.Text & "&ToDate=" & txtToDate.Text & "&File=" & drpReports.SelectedValue & "');</script>")
2
2812
by: iloveprincess | last post by:
Hi, I'm developing windows application using VB.Net 2005. I would like to send 'save' message using 'SendMessage' API to the excel appication. I've already got a handle of the excel window with 'FindWindow' API. How can I send 'save' command to external excel window? Actual thing I want to do is I can handle excel application in the winform. My client hope that all staff can use excel application in new window
3
3077
by: Joe | last post by:
I need to popup a window, allow the user to select an image, update the parent window with this new value (requires a refresh) and then close the child window. Are there any examples of something similar to this? Thanks, Joe
1
1445
by: kojy | last post by:
Hi, I have .ssi window with button that open new window like that: OpenWindow = window.open('LoginFDS.htm','FDSPassword','left=300,top=300,width=400,height=300,toolbar=0,resizable=0',directories=0,status=0,menubar=0); in the new window the user should enter password that should send to the .ssi window and close the new window. How can I send the password up to the .ssi page and then close the window. thanks
3
100102
digicrowd
by: digicrowd | last post by:
http://bytes.com/images/howtos/applemail_sig_icon.jpg You can make your emails fancy in Mail.app by using Rich Text formatting or even included Stationery. But, a simple way to send your own HTML creation (or any web page for that matter) is to use Safari. Follow these four easy steps. 1. Create the HTML Layout your HTML code including any images or graphics you'd like to include. In this example, we will make a simple birthday email to add...
0
10595
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, 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...
0
10343
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...
0
10088
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
9169
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
7633
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
5529
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
5668
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
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
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.