Click to See Complete Forum and Search --> : how put a link at <button>...</button>?


jojo13
04-15-2010, 07:49 AM
Hi.I am new here.
I want to put a link to this button but i can't:
Exactly i have this:

<button type="submit" value="Submit">Press</button>

and i want to add a link in order each time someone presses it to get to the new page that button links to.
I tried also to add this link as a form but i have also an other form in my code and i cannot define 2 forms at css styles.

tirna
04-15-2010, 07:59 AM
<button type="submit" value="Submit">Press</button>


should probably be


<input type="submit" value="Press" name="btnSubmit" />


and will submit the form data to the page set in the form's action.

If you just want a button that links to another web page, try:


<button onclick="window.location.href='some_url';">Press</button>

jojo13
04-15-2010, 08:15 AM
exactly i want not only this button links to another page but also to submit this data to this page.

I tried the last command that you said but it doesn't seem to be right as it doesn't transfer to another page.It says ''problem loading page''

jojo13
04-15-2010, 08:18 AM
A sorry.It was my fault.Now fixed!!!

I entered this command at wrong place.

Thank you very much!I was trying a whole day to fix it.

tirna
04-15-2010, 08:21 AM
ok, no problem :)

jojo13
04-15-2010, 08:21 AM
sorry.It was my fault.Now fixed!!!

I entered this command at wrong place.

Thank you very much!I was trying a whole day to fix it