HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 19th, 2004, 10:59 AM
ani_v21 ani_v21 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 7 ani_v21 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post form values to a Pop-Up window using <a href='#' onclick=... ......>

How do I post form variables from parent window to a new pop-up window.

<script language=javascript>

function openHCPReport()
{ window.open("Report.aspx","printwind); }

</script>

<form name = f1 >

<a href='#' onclick="javascriptpenReport();" >Print Report </a>

<input type=hidden value=123 name=txtNum>

</form>


I do not want to use onsubmit event on the form. Using onclick on the hyperlink, how do I submit the form values.
I tried adding

document.f1.method='post';
document.f1.submit;

to the javascript function , but no use. Infact, I have tried using target attribute too...

Can I post the form the pop-up on a hyperlink??

I was unsuccessful in making it work. I would greatly appreciate if someone can please provide the complete code with a short example . I want to access the hidden value using Request.Form("txtNum") .

Thanks.

Reply With Quote
  #2  
Old February 19th, 2004, 11:17 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,770 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 6 h 58 m 22 sec
Reputation Power: 469
try this
Code:
<script language=javascript>
function OpenReport(rID)
{
   var objWin, varURL
   varURL = 'Report.aspx?ReportID=' + rID 
   objWin = window.open(varURL,'','left=300,top=300,toolbar=fa  lse,status=yes,directories=false,menubar=false,scr  ollbars=false,resizable=false,copyhistory=false,wi  dth=300,height=75'); ****
}
</script>

<form name = f1 >

<a href='#' onclick="javascriptpenReport(<%=txtNum%>);" >Print Report </a>
</form>

Reply With Quote
  #3  
Old February 19th, 2004, 04:30 PM
ani_v21 ani_v21 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 7 ani_v21 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Using Request.Form ?????

I can pass it through querystring. That's the reason , I said
"Post". I should be able to retrieve using Request.Form("txtNum")

Reply With Quote
  #4  
Old February 19th, 2004, 04:49 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,770 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 6 h 58 m 22 sec
Reputation Power: 469
You would need to use Server.Transfer

Reply With Quote
  #5  
Old February 26th, 2004, 08:02 PM
peggun peggun is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 peggun User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy help...

for <a href='#' onclick="javascriptpenReport(<%=txtNum%>);" I'm doing something like this, but for the 'txtNum', mine would change depending on which button user clicks, how could i do that ? Because for now what I'm doing - <A href="javascript:OpenCalendar('txtDate0', false);"><A href="javascript:OpenCalendar('txtDate0', false);"> how can I don't hard code the 'txtDate0' ???

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Post form values to a Pop-Up window using <a href='#' onclick=... ......>


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT