Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2005, 03:24 AM
Authorized User
 
Join Date: Dec 2004
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
Send a message via Yahoo to whiterainbow
Default Window.Open not passing argument in ASP.NET

Hi,

I am using a repeater control and passing one argument from the hyperlink I am using there. When I try to open a window using window.open method without arguments, it is opening but with parameters/arguments it is showing Javascript error. The datatype of the argument is string and when i try to print the string using alert it is printing there.

Please help me in sending parameter using window.open method.

Thanking you.

SK
__________________
Thanks in advance.

Regards,

Senthil Kumar M.
 
Old May 10th, 2005, 03:56 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

First make Javascript function which does the call window.open,so that you can test it easily from a button click by passing some hard coded values.

If any problems occur post only that function, lets see.

If its working call this function from Hyperlink.

Prashant



 
Old May 10th, 2005, 04:03 AM
Authorized User
 
Join Date: Dec 2004
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
Send a message via Yahoo to whiterainbow
Default

Thank you Prashant.

The mistake is of my side that I have passed the argument in caps but when i get the argument it was in lower case. So when i changed the case, it started work fine.

The code i used previously and now it looks like following:

//Old Code
<script language="Javascript">
function newwin(ARGS)
{
      window.open("testfile.aspx?arg="+args,"Title","Fea tures");
}
</script>

//And I changed the code like this
<script language="Javascript">
function newwin(ARGS)
{
      window.open("testfile.aspx?arg="+ARGS,"Title","Fea tures");
}
</script>

So now it started to work.

SK





Similar Threads
Thread Thread Starter Forum Replies Last Post
passing argument to a page in c# kawalsingh28 ASP.NET 1.0 and 1.1 Professional 3 October 16th, 2006 07:02 AM
open popup window in asp.net rajn ASP.NET 1.0 and 1.1 Basics 6 August 2nd, 2006 06:23 AM
How to open window browser in ASP? Andraw Classic ASP Basics 6 March 31st, 2005 07:31 PM
passing datatype as a function argument texasraven VB.NET 0 September 23rd, 2003 10:22 AM
passing datatype as a function argument texasraven VB.NET 2002/2003 Basics 0 September 23rd, 2003 10:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.