3 Replies - 23154 Views - Last Post: 06 August 2011 - 01:02 AM

#1 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

how to set href link to button

Posted 05 August 2011 - 11:40 PM

hi all,

does any one know how to set a href link to passe a variable to another page using sumit buttons??

thanks in advance,
menuka
Is This A Good Question/Topic? 0
  • +

Replies To: how to set href link to button

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 4138
  • View blog
  • Posts: 13,074
  • Joined: 08-June 10

Re: how to set href link to button

Posted 06 August 2011 - 12:45 AM

won’t work.

you can pass a variable (using GET) through a link, but you have to click on the link for that.

if you use a submit button, all variables of the form controls in the according form are sent. a link is not a form control element.
Was This Post Helpful? 1
  • +
  • -

#3 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: how to set href link to button

Posted 06 August 2011 - 12:53 AM

is there any option to do this with submit button.
if u visit this link u can get some idea. I have used a link but it is not nice , beautiful . that's why i am trying to set a submit button.

in the link i passe the postid to save data base. if I use button , as well as i want to passe variable with a submit button.

plz help me , thanks,
menuka
Was This Post Helpful? 0
  • +
  • -

#4 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 4138
  • View blog
  • Posts: 13,074
  • Joined: 08-June 10

Re: how to set href link to button

Posted 06 August 2011 - 01:02 AM

make a form around the submit button and save the variable in a hidden input field. for the backend it does not matter, whether the data were being served from a hyperlink or a form.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1