Solved

Submit Button

Posted on 2000-04-13
12
199 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
Industry Leaders: 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!

 

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Date on a table 16 43
Text too large in Chrome 17 82
How do I show a login page over the login page? 5 55
w3c parsing errors 4 36
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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…

738 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