Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

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 Codewalkers Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old August 19th, 2002, 09:12 AM
notbad notbad is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Sunshine Coast, Qld, Australia
Posts: 3 notbad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to notbad
Use a link to submit?

I want to make a link submit the form it's in. I thought I might be able to do something like this but I'm having trouble.

<a href="#" onClick="javascript:this.form.submit()" name="_go">link name<a/>


Any hints will be appreciated.

Reply With Quote
  #2  
Old August 19th, 2002, 03:26 PM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to EvilivE
RE: Use a link to submit?

php Code:
Original - php Code
  1.  
  2. <html>
  3. <body>
  4. <form name=frmMain action=<? echo $_SERVER['PHP_SELF']; ?> action=get>
  5. <input type=text name=txtName>
  6. <a href=# onClick="document.frmMain.submit();">Submit</a>
  7. </form>
  8. <?
  9. echo "<p>".$_GET['txtName'];
  10. ?>
  11. </body>
  12. </html>

Reply With Quote
  #3  
Old August 20th, 2002, 01:04 AM
bakertrg's Avatar
bakertrg bakertrg is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Scottsdale AZ, US
Posts: 2,253 bakertrg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 45 sec
Reputation Power: 4
Send a message via Yahoo to bakertrg
RE: Use a link to submit?

You need to change the second action to method but this is nice code.

B

Reply With Quote
  #4  
Old August 20th, 2002, 01:06 AM
bakertrg's Avatar
bakertrg bakertrg is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Scottsdale AZ, US
Posts: 2,253 bakertrg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 45 sec
Reputation Power: 4
Send a message via Yahoo to bakertrg
RE: Use a link to submit?

If you put a value in the () will that be the value of the submit variable on the next page?

B

Reply With Quote
  #5  
Old August 20th, 2002, 03:56 AM
siteworkspro.com siteworkspro.com is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 92 siteworkspro.com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to siteworkspro.com Send a message via AIM to siteworkspro.com
RE: Use a link to submit?

no, if you want to submit a key/value, you would use a hidden input

<input type="hidden" name"key" value="value">

Reply With Quote
  #6  
Old August 22nd, 2002, 02:09 AM
Gipz Gipz is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Stockholm, Sweden
Posts: 98 Gipz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to Gipz
RE: Use a link to submit?

Does this aproach work in all browsers?

Reply With Quote
  #7  
Old August 22nd, 2002, 08:20 AM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to EvilivE
RE: Use a link to submit?

One tiny, innocent word ... "all".

I know I am not going to say yes, heck I know of 8 browsers of the top of my head ... not including all the different versions of those eight.

How about this answer: it should work with browsers that support javascript _AND_ the user has it enabled.

Reply With Quote
  #8  
Old August 22nd, 2002, 07:35 PM
bakertrg's Avatar
bakertrg bakertrg is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Scottsdale AZ, US
Posts: 2,253 bakertrg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 45 sec
Reputation Power: 4
Send a message via Yahoo to bakertrg
RE: Use a link to submit?

Could this be used to submit to a new window?

Reply With Quote
  #9  
Old October 3rd, 2002, 11:46 PM
sarah's Avatar
sarah sarah is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Auckland, New Zealand
Posts: 127 sarah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 32 sec
Reputation Power: 2
Send a message via ICQ to sarah Send a message via AIM to sarah Send a message via Google Talk to sarah
RE: Use a link to submit?

I have always used a different approach but I believe you can have a target attribute in your <form> tag.

Additionally if your hyperlink is inside the form it can be <a href="javascript:submit();">click me</a>

Reply With Quote
  #10  
Old October 4th, 2002, 11:22 PM
marc marc is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 marc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Use a link to submit?

<form method="post" action="<a target="_blank" href="http://www.yourdomainname.com/filename.php">

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Use a link to submit?


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway