Changing mailto button to a link button

GustavNovak

Newbie
Joined
Jun 7, 2012
Messages
35
Reaction score
5
Hello everyone, I have posted this today to one newbie dedicated forum, to get some help, but I guess that it is as stupid question that it is not worth answering there. I really dont have anyone who would help me with this and it is really one and only thing I need to do with one of my sites in php. I am sure it would take 1 minute to read, facepalm and reply, so if anyone would help, I would remember his name until the Armageddon. (And believe me, I am still crying when watching Bruce pushing that button.)

Back to the problem: I have a button: (the comail variable is email adress now, I ll be adding links then)

button.jpg

and I would love to make it into a link: (this is my solution which obviously is not working)

link.jpg

Ok this looks ridiculous, but I am really lost. This forum hates me also, even though I put it in code, this forum thinks it is a link. So well, there you go I ll be praying. Thanks in advance, have fun.
 
change your code to this: onclick="window.location.href=.....

edit:
Code:
<input type="button" class="apply" name="apply" value="Apply Now!" onclick="window.location.href='<?php echo get_post_meta($post->ID, 'wtf_comail', true); ?>'" />
 
Last edited:
Thank you a lot for your response, but this does not solve my problem.

Let's say that the button is on a page www page/hello, after clicking the button it redirects me to www page/hello/$comail
 
I would just forget about the stubborn thing, and leave the forum to think it's a link :D
 
Thank you a lot for your response, but this does not solve my problem.

Let's say that the button is on a page www page/hello, after clicking the button it redirects me to www page/hello/$comail

I am an idiot and you are my hero. The next time I ll cry because of you pushing the button, thanks, it is not worth it, talking about relative and absolute paths i guess.
 
I would just forget about the stubborn thing, and leave the forum to think it's a link :D
Maybe you could, but I can't post links so far. :) I know the post looks ridiculous with the images, but I got my answer and thanks.
 
Back
Top