IT Community - Software Programming, Web Development and Technical Support

How can I pass a hidden value to a form and submit that form when a text link is clic

This is a discussion on How can I pass a hidden value to a form and submit that form when a text link is clic within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Hi all..... How can I pass a hidden value to a form and submit that form when a text link ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-17-2007, 08:05 AM
itbarota itbarota is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 547
itbarota is on a distinguished road
Default How can I pass a hidden value to a form and submit that form when a text link is clic

Hi all.....

How can I pass a hidden value to a form and submit that form when a text link is clicked?

Thanks & Regards
itbarota...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-17-2007, 08:07 AM
Pvinothkumar Pvinothkumar is offline
D-Web Analyst
 
Join Date: Sep 2007
Posts: 237
Pvinothkumar is on a distinguished road
Default Re: How can I pass a hidden value to a form and submit that form when a text link is

Hi....

<form name="myForm">
<input type="hidden" name="myHiddenField">
<input type="submit" name="mySubmitButton">
</form>

<script language="JavaScript"><!--
function submitForm() {
document.myForm.mySubmitButton.click();
}
//--></script>

<a href="#" onClick="document.myForm.myHiddenField.value='Hell o World';this.href='javascript:submitForm()'">Hello World</a>

Thanks....
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can we submit a form without a submit button? sundarraja PHP Programming 4 02-29-2008 09:37 PM
Submit a Form using Javascript velhari HTML, CSS and Javascript Coding Techniques 3 11-14-2007 03:33 AM
How do I set and access the value of a hidden form field? Pvinothkumar HTML, CSS and Javascript Coding Techniques 1 10-16-2007 04:14 AM
How do I submit a form or a part of a form without a page refresh in ASP.Net using C# mobilegeek ASP and ASP.NET Programming 1 07-23-2007 10:38 PM
Submit without form Anand PHP Programming 1 07-19-2007 03:36 AM


All times are GMT -7. The time now is 09:08 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0