473,396 Members | 1,804 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,396 software developers and data experts.

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="JavaScript"> function openpic(picid) {

window.open("PicContainer.aspx","","width=450,heig ht=400,left=180,top=10");
} </script>

As you see I have the picid as a parameter. Tried to add it as
PicContainer.aspx?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 5382
for javascript you have to use + not &
<script language="JavaScript"> function openpic(picid) {

window.open("PicContainer.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**************@TK2MSFTNGP10.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="JavaScript"> function openpic(picid) {

window.open("PicContainer.aspx","","width=450,heig ht=400,left=180,top=10"); } </script>

As you see I have the picid as a parameter. Tried to add it as
PicContainer.aspx?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
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...
5
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 ...
0
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...
2
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...
3
by: Lars Netzel | last post by:
Hello! I have a button, in the click event I have this code: ---------------------------------------------------------------------------- ---------------------------- Response.Write("<script...
2
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...
3
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...
1
by: kojy | last post by:
Hi, I have .ssi window with button that open new window like that: OpenWindow =...
3
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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
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
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
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,...

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.