473,544 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

submit from on click from hyper link

3 New Member
Guys,

I am calling onclick="docume nt.form.submit( );" in a hyper clink.

On click, it goes to a fuseaction where act_load_struct ure.cfm loads the structure with form variable.

But the form fields are not avaibale in act_load_struct ure.cfm . It says form fields are not defined. Do you know why.

I appreciate your help in advance
Mar 27 '08 #1
8 6127
hussain123
28 New Member
I think you have specified the cfm path in the href attribute of the link.
Remove that!!! Then it should work.

Hussain


Guys,

I am calling onclick="docume nt.form.submit( );" in a hyper clink.

On click, it goes to a fuseaction where act_load_struct ure.cfm loads the structure with form variable.

But the form fields are not avaibale in act_load_struct ure.cfm . It says form fields are not defined. Do you know why.

I appreciate your help in advance
Mar 27 '08 #2
jolakammu
3 New Member
I think you have specified the cfm path in the href attribute of the link.
Remove that!!! Then it should work.

Hussain

here is by href. what do i need to remove.

<a href="#Attribut es.TemplateURL# ?CurrentPage=#C ount##Attribute s.AddedPath#" onclick="docume nt.form.submit( );">

with this, it is going to the correct fuse action but the form variables are not available.
Mar 27 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
Show the form code. What is the method of submitting, GET or POST? Are you retrieving the form values as GET (url.formvar) or POST (form.formvar)?
Mar 27 '08 #4
jolakammu
3 New Member
Show the form code. What is the method of submitting, GET or POST? Are you retrieving the form values as GET (url.formvar) or POST (form.formvar)?

Here is the dsp page


Expand|Select|Wrap|Line Numbers
  1. <cfoutput>
  2. <cfform name="form" id="form" action="index.cfm" method="post">
  3. <table>
  4.     <tr>
  5.         <td>
  6.             <input type="text" name="log" value="#attributes.log#" />
  7.             <input type="text" name="AcctId" value="#attributes.AcctId#" />        
  8.             <input type="text" name="tablename" value="test" />                    
  9.         </td>
  10.     </tr>
  11. </table>
  12. <table width="100%">
  13. <tr>
  14. <td align="left">
  15.     <a href="index.cfm?fuseaction=#XFA.test#&amp;log=#attributes.log#&amp;AcctId=#attributes.AcctId#&amp;rn=#attributes.rn#" onclick="document.form.submit();">test</a>
  16. </td>
  17. </tr>
  18. </table> 
  19. </div>
  20. </cfform>
  21. </cfoutput>
  22.  
Here is the destination page

<cfoutput> tablename = #form.tablename #</cfoutput>
<cfabort>

or

<cfoutput> tablename = #tablename#</cfoutput>
<cfabort>


I appreaciate your help
Mar 27 '08 #5
acoder
16,027 Recognized Expert Moderator MVP
Make the link into a submit button and/or move the href into the action attribute of the form. At the moment, it's posting to just "index.cfm" .
Mar 31 '08 #6
hussain123
28 New Member
Try this code,it should work.


Expand|Select|Wrap|Line Numbers
  1.      <cfoutput>
  2.  
  3.       <cfform name="form" id="form" action="index.cfm?fuseaction=#XFA.test#&log=#attributes.lo  g#&AcctId=#attributes.AcctId#&rn=#attributes.rn#" method="post">
  4.  
  5.       <table>
  6.  
  7.           <tr>
  8.  
  9.               <td>
  10.  
  11.                   <input type="text" name="log" value="#attributes.log#" />
  12.  
  13.                   <input type="text" name="AcctId" value="#attributes.AcctId#" />  
  14.  
  15.                   <input type="text" name="tablename" value="test" />             
  16.               </td>
  17.           </tr>
  18.        </table>
  19.        <table width="100%">
  20.        <tr>
  21.       <td align="left">
  22.           <a href="##" onclick="document.form.submit();">test</a>
  23.       </td>
  24.       </tr>
  25.       </table>
  26.       </div>
  27.        </cfform>
  28.        </cfoutput>
  29.  
Hussain
Apr 7 '08 #7
acoder
16,027 Recognized Expert Moderator MVP
That should work about right.

To the OP: you're passing the attributes.log/AcctId values in the URL and the form values of the same name will also be posted. Is this necessary? Thought I'd just point out.
Apr 8 '08 #8
hussain123
28 New Member
Absolutely not required.
I just copied-pasted the url param into the Form's action tag without looking into the copied stuff. :D
Apr 8 '08 #9

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

Similar topics

1
8315
by: Stanimir Stamenkov | last post by:
Here's an example: <form action="bogus" method="post"> <p> <a href="prev.cgi"><input type="submit" name="prev" value="< Back"></a> <a href="next.cgi"><input type="submit" name="next" value="Next >"></a> </p> </form>
4
3339
by: jim | last post by:
I new with .net and asp. I can't find a way to link a asp page from a asp.net page. I have tried a button and even a simple hyper link is not working. When I click the hyper link in asp.net(in the navigateUrl I have an asp page), it let me down load the asp file. Can anybody help me? Jim
7
3779
by: bill | last post by:
Is there any way to make a link (as marked by an <A>-tag, that is), behave exactly like a submit button? Many thanks! -bill
2
2076
by: Matt | last post by:
Can we click a link and it will submit the form to the other page? Usually we will submit the form to other page by clicking a submit button. Now I need to do the following, but what if I have many data in the form? Any workarounds? <a href="http://myserver/index.jsp?name=test&actionType=test" target="_blank">Add New Document</a> Please...
2
1954
by: Billy | last post by:
Hi. I'm new to asp.net and I'm trying to create a confirm dialog box using the confirm() javascript function that will pup once the submit button is pressed. My problem is when I call document.forms.submit() in the script, I would like to execute the code in the click event of the submit button. How could I link this event to the...
26
2881
by: Mica Cooper | last post by:
Hi, I need to pass some info in a javascript submit. <a href="javascript:document.formName.submit();">Submit Form</a> Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull x1, x2, x3. I have no clue how to do this with a link submit. Thanks,
1
1434
by: doris1202004 | last post by:
I have divide three frames: 1 is the menu which show the choice a,b,c. on the left side this is a typer-link 2 is the body frame which show the img on the right frame 3 is the sentense frame which show the explination on the buttom frame If I click the choice "a" it will open a image and display on the body frame. The problem is how could I...
0
7416
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7761
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7363
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7701
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5289
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3400
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1833
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
983
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
653
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.