Solved

Submit Button

Posted on 2000-04-13
12
192 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
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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now