Solved

Submit Button

Posted on 2000-04-13
12
200 Views
Last Modified: 2010-04-09
Does anyone know how to change a 'Submit' type button to a
link?

The HTML Client requires a button with a name as follows:-

<input type='submit' value='Go Back' name='bKEY_interrupt'>

This tells the 4GL program what to do. I've tried :-

<a href='JavaScript:submitForm()'>

But it needs to have a name to work correctly.
0
Comment
Question by:carldpatterson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 1

Expert Comment

by:ManoloMA
ID: 2711240
Try with:

<form id="frm">
</form>

<a onclick='JavaScript:frm.submit()' href=''>



0
 

Expert Comment

by:qiang8
ID: 2711257
Try this:

<FORM METHOD=POST ACTION="URL" id=form1 name=form1>
Click the button to go URL.
<input type='submit' value='Go' name='bKEY_interrupt'>

Hope this will help.
0
 
LVL 1

Expert Comment

by:hkmdj
ID: 2711701
Depends if you need it to actually submit or not.  For a simple link, do this...
<form>
<input type="button" value="yourval" onClick="location.href='page.html'">
</form>

need the form tags to be viewed in NN
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 

Author Comment

by:carldpatterson
ID: 2711774
I want to change the grey button so that it will look the same as the other links on our bannner bar.
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 2711797
Do you mean you want it to be an image?

<INPUT type='image' src='mysubmit.gif'>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 2711803
For a regular link, I prefer this method:

<A href='#' onClick='document.NameOfYourForm.submit();return(false);>Submit</a>
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2711813
If you are simply trying to submit a form with a normal link, then ManoloMa has the right solution, though I would do it like this (more browser safe):
<FORM name="formname" action="something.cgi">
<!- form contents.... -->
</FORM>
<A HREF="JavaScript:;" onClick="document.formname.submit(); return false;">Submit me:)</A>

-Josh
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2711819
Sheez! kek slipped in two comments while I was writing that out....
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 2711838
... I hate when that happens  :)
0
 
LVL 11

Expert Comment

by:thunderchicken
ID: 2712447
this is probably all the same, but this is what i do

<form method=post action = "http://www.yahoo.com">
<input type = "submit" value = "Goto Yahoo"></form>

I found out you have to have the </form> tag or else netscape wont run it.

it's pretty much the same as qiang8's but make sure you use the </form>
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2712937
OK, if _I_ understand this correctly he wants to have a link which submits the form, BUT when the page gets send to the server program it will look at what button has send the request. if that name equals a certain value then it'll process that stuff. So a <a href="javascript:form.submit()"> won't work since it doesn't have a name nor, if you do specify a name in the A tag, send the name of a normal A tag. So, what you might want to do is to call the click() of the button which has to send the form...I don't know if this'll work properly but you can try it. Or (depends what the method of the form is, either post or get) you can put some additional query in the querystring.

Good luck
0
 
LVL 8

Accepted Solution

by:
jbirk earned 45 total points
ID: 2712981
Ahhhh, if that's the case another, I think easier solution would be to use a hidden field which contains the submit value your program needs, like this:

<input type='hidden' value='Go Back' name='bKEY_interrupt'>

That way when you submit via document.theform.submit(); the value will still be sent and the receiving program will think it's that submit button...

-Josh
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question