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

I can't get Form name - form name pass to hyperlink

Hi,

i use one function i can't get formname in alert message box. pls replay soon

Expand|Select|Wrap|Line Numbers
  1.   for(var i=0,j=0;i<SelectedMagazines.length;i++)
  2.   {
  3.         if(item.name==SelectedMagazines[i].name) 
  4.          {
  5.    var price="";
  6.   var newhtml='<form name="frmLogin" action="login" method="post">';     
  7.    newhtml +='<table width="200" height="30" class="PageText" border="1"><tr><td>'
  8.   newhtml +='<input type="radio" id="rdSingleIssue" name="reason"  value="rdSingleIssue"/> Single Issue Price </td><td align="right">'+SelectedMagazines[i].price+' </td></tr><tr><td>';
  9.     newhtml +='<input type="radio" id="rd12Issue" name="reason" value="rd12Issue"/> 12 Issue Price </td><td align="right">'+SelectedMagazines[i].Issue12+' </td></tr><tr><td>';
  10.      alert("From " +newhtml);
  11.     alert(this.form);
  12.    newhtml+='<center><div id ="SingleDisplayBuy"><a href="javascript:Magazinecheckbuy('+item.id+','+isCollection+',this.form)"><img src="images/bt_buy.gif" align="middle" alt="" width="60" height="20" vspace="5" border="0"></a></div></center></td></tr></table></form></td>';
  13.   }
  14.  }
Apr 5 '08 #1
6 1660
acoder
16,027 Expert Mod 8TB
If you mean line 11, use the name property, i.e. this.form.name.

PS. use [code] tags when posting code.
Apr 5 '08 #2
If you mean line 11, use the name property, i.e. this.form.name.

PS. use [code] tags when posting code.

Hi,

i can't get form name then how can i use this.form.name
in above my code im not able pass this.form in other function.
what mistake i done.
Apr 5 '08 #3
acoder
16,027 Expert Mod 8TB
Can you explain what you're trying to do?

Do you mean in the function Magazinecheckbuy()?
Apr 5 '08 #4
hi,

How to pass the form name to hyperlink. its possible.

1.html += "<form name='frmReader' method='post' action = 'DownloadReader'>";
2.html += '<ul><li><a href="javascript:Download(this.form)">Reader Download</a></li></ul></span></ul><br></form>';

i can't get the form name.
Apr 21 '08 #5
pronerd
392 Expert 256MB
Without more details, and the code from the function method I can not say for sure since I am not clear on what you want to do. If you just want to pass the form's name to the download() function then you can change the function call to be something like this.

Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:Download(this.form.name)">
Apr 21 '08 #6
acoder
16,027 Expert Mod 8TB
Double-posted threads merged.

Please do not double post your questions. Keep all posts relating to one problem in a single thread.

Moderator.
Apr 21 '08 #7

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

Similar topics

4
by: ry66 | last post by:
Hello All! Is it possible to submit a form using hyperlink? I want to send hidden element when a link is clicked. I read some books, but I found only using button which I don't want to use. ...
0
by: Chumley Walrus | last post by:
I can't see my datagrid when I run it from my project in VisualStudio.net, but when I work with it locally thru http://localhost/myproject/mydgrid.aspx, it works fine.: datagrid coding: ...
1
by: dale zhang | last post by:
Hi, I have a web form page. it has gridlayout and a table at top like a template. When I have the literal or requiredfieldvalidator ErrorMsg displayed, they are all over the page. Is there...
1
by: Biva | last post by:
Hello, I have a drop down list control in a datagrid. I can't seem to populate the control. Here is what my code looks like: <EditItemTemplate> <asp:DropDownList ID= "ddlUser5" DataSource =...
3
by: Celine | last post by:
Hi, I am just starting developping in ASP.Net and I have some trouble using a user control in a web form. In my user control I have a datagrid with hyperlink and in my web page I want to...
2
by: TPS | last post by:
I have some dynamic controls (LinkButton) that I am adding to my pages. When the link button is clicked, I am getting an ID from the LinkButton.CommandArguement value. I am then using that ID...
2
by: VB Programmer | last post by:
I only have 1 set of <FORM> tags in my HTML file, but I keep getting this error. Any ideas? *********** A page can have only one server-side Form tag. Description: An unhandled exception...
2
by: c676228 | last post by:
Hi, This is my first time to post asp.net question on this forum. I have a question for "How to pass the first form value to the next form" I have enrollinfo.aspx form which look like as follow:...
2
by: Andy | last post by:
Hi, This is one of those things I thought should e easy... I'm programatically trying to set the navigateURL property in a hyperlink in the headertemplate of a repeater, but always get the...
1
by: khalid sohail | last post by:
hi everybody i want to pass the window size parameter to <asp:hyperlink> attribute Navige URL Property. tell me how to pass the parameter to it.....actually i want to open the new window on the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.