Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Submit Button

Posted on 2000-04-13
12
Medium Priority
?
201 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
Technology Partners: 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 180 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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…

688 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