Solved

Submit Button

Posted on 2000-04-13
12
193 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Asp.net mvc foreach 3 35
form button worked now it doesnt anymore 9 42
send keys not working in vba 7 46
Zoom the page when you go in from your phone 3 23
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

864 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

19 Experts available now in Live!

Get 1:1 Help Now