granholmen
asked on
button that links to both javascript-function and mailto:xxx@domain.com open a new email twice
Look at this case:
https://www.experts-exchange.com/questions/25025908/I-have-a-link-to-a-javascript-function-and-I-need-the-link-to-work-as-a-button.html
The last comment describes the problem.
https://www.experts-exchange.com/questions/25025908/I-have-a-link-to-a-javascript-function-and-I-need-the-link-to-work-as-a-button.html
The last comment describes the problem.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nothing less than perfect - the code from npcw :) and I will accept the solution, to make it even more perfect do I have a one more question, or - should I post it as another problem? I will if u tell me to.
The question:
This an axample of what comes into the email:
"Du har valgt følgende hotell:<br><br>Grand Hotel<br>Best Western Karl Johan Hotell<br>Rica Victoria Hotel<br>Best Western Karl Johan Hotell"
As you see, the linebreakes in the div also comes into the email. Is there any way to get rid of them - and replace the code <br> with real linebreakes in the email?
Agein...should I post this as a new question?
The question:
This an axample of what comes into the email:
"Du har valgt følgende hotell:<br><br>Grand Hotel<br>Best Western Karl Johan Hotell<br>Rica Victoria Hotel<br>Best Western Karl Johan Hotell"
As you see, the linebreakes in the div also comes into the email. Is there any way to get rid of them - and replace the code <br> with real linebreakes in the email?
Agein...should I post this as a new question?
ASKER
I made a new question about the comment above.
what is the link to the next question?
Try adding a
;return false
to the onclick-handler