Copy link to clipboard
Copied
Hi all -
I am using RoboHelp v7. I inherited my KB's already set up, but have been maintaining them for a couple of years now. However, we moved from Outlook to Google mail, and users are no longer able to send email from Robo. Note that I am able to send email from any other webpage using my corporate gmail account, having set up my mailto to utilize gmail.
I have email addresses in my KB's in two formats, and tried a third based on a post I read.
In all three examples above, when I click on an email link, the main page of the KB goes blank, and nothing happens.
If I click on a normal webpage link (such as http://www.swingandblues.com/about.html, Greg Avakian - "swingdj@gmail.com", I generate an email without issue.
I'd appreciate any assistance, I have no idea where to go next.
Thank you,
Anahid Avakian
Hi,
Your code is hard to read because of the forum markup. Please post a screenshot of the code if the following doesn't help.
In your new code you have "d++ocument.write". Remove the two +, so it reads: "document.write".
Greet,
Willam
Copy link to clipboard
Copied
Some additional information - did some more testing. If the page uses the contents, as this one does, the email does not work. Again, it did with Outlook, but it does not when the user uses google mail as their email client. Desperately hoping someone has a solution...
However, if I were to open this in it's own window, without the contents frame, the email works perfectly, and launches a gmail window -
Copy link to clipboard
Copied
Hi,
Google "Gmail mailto:". It seems this is some problem. See also: http://mail.google.com/support/bin/answer.py?hl=en&answer=10966
The links you provide look like normal mailto links. As I see it, any problems are to be blamed on GMail. As far as I can find, it looks like you have to setup your browser to make the links work.
As a workaround, try creating a popup to launch the link. For instance, call the following function:
function mailto() {
var HTML = 'mailto:test@test.com';
window.open(HTML,'Email');
}
Greet,
Willam
Copy link to clipboard
Copied
Hi William -
Thanks much for the response. Yes - I have set up gmail as my default for email, the only time it's a problem is when the email address is in a page where I have the contents frame.
I understand the concept of what you are saying about the pop-up email - and logically it sounds like it should work. But here is where my ignorance shows - this is what I currently have for the email, so that it will display the proper subject and report the page the mail is being sent from - it works perfectly (if not in a frame, of course!).
document.write("<a href=\"mailto:infomoto.help@gmail.com?subject=" + document.title + " section of the PDM1 KB\">infomoto@motorola.com</a>");
How would I incorporate your function?
Many thanks...
Anahid
PS - your gmail solution is much easier than mine, I will pass that onto my co-workers who are just migrating now - thank you!
Copy link to clipboard
Copied
Hi,
The javascript that you're using doesn't open a popup. It add a mail link with the title of the page in the subject. To open a popup, you need the window.open command. In your (master)page add the following script:
<script type="text/javascript">
function Mailto(subject) {
var HTML = 'mailto:test@test.com?subject='+subject+' section of the PDM1 KB';
window.open(HTML,'Email');
}
</script>
Change the function to:
document.write('<a href="javascript:void(0);" onclick="Mailto(\''+document.title+'\')" >youremail</a>');
Note that the function Mailto has to be available wherever you are using the hyperlink. I guess that your mail link is in the footer of a masterpage or inside a snippet. Just add the function in whatever you're using for the mail hyperlink.
Greet,
Willam
document.write edited. I forgot two quotes.
Copy link to clipboard
Copied
Hi William -
Your answer makes sense to me, but I am afraid I know zip about Java scripting. Although - I have been poking around on the internet for the last couple of hours and trying to learn something.
I am using a script in a footer (which I didn't create), and that line I have is the only line in there -
document.write("<a href=\"mailto:infomoto.help@gmail.com?subject=" + document.title + " section of the PDM1 KB\">infomoto@motorola.com</a>");
I tried replacing what I have with your script, but that gives an runtime error:
<script type="text/javascript">
function Mailto(subject) {
var HTML = 'mailto:infomoto.help@gmail.com?subject='+subject+' section of the PDM1 KB';
window.open(HTML,'Email');
}
</script>
I'm afraid when you say "Change the function to:" I'm not sure what you mean. Yes - I realize my knowledge level is pretty low, so if this is annoying to you, I certainly understand
document.write('<a href="javascript:void(0);" onclick="Mailto(\''+document.title+'\')" >youremail</a>');
Interestingly enough, I noticed that when I send email now after using your gmail fix, it is no longer sent from my corporate google account, but from the infomoto gmail account I created, which is odd. Trying to figure out what is going on there.
I hope you realize how much I appreciate your time!
Anahid
Copy link to clipboard
Copied
Hi,
No sweat. The function (javascript command) you already have adds the mailto hyperlink. This is the script:
document.write("<a href=\"mailto:infomoto.help@gmail.com?subject=" + document.title + " section of the PDM1 KB\">infomoto@motorola.com</a>");
Replace that with
document.write('<a href="javascript:void(0);" onclick="Mailto(\''+document.title+'\')" >youremail</a>');
In WYSIWYG mode you should see a red square. Thats the command that adds the link.
In HTML mode, find the document.write again. Just before it should be a tag "<script type="text/javascript">". It's the script bit thats important the type attribute may be missing and other attributes may be present. Immediately before the <script> tag, add
<script type="text/javascript">
function Mailto(subject) {
var HTML = 'mailto:infomoto.help@gmail.com?subject='+subject+' section of the PDM1 KB';
window.open(HTML,'Email');
}
</script>
Save you topic and go to WYSIWYG mode. You should now see two adjacent red squares.
Compile and see if your problem is solved. If not, please post back.
Greet,
Willam
Copy link to clipboard
Copied
Thank you WIlliam - I'm unexpectedly up in NY dealing with some family stuff, but will look at this as soon as I get home.
I really appreciate your assistance. I know I found some self-paced RoboHelp training on the site here - would you be able to recommend something similar for java scripting? I found some very basic stuff, but would be interested in learning and understanding. Maybe someday I could assist someone else
Anahid
Copy link to clipboard
Copied
No sweat. Just post back if your problem isn't solved.
Greet,
Willam
Ps. For learning JavaScript, HTML and CSS there are lots of websites that provide tutorials. Try looking at about.com. Sniff around on amazon, there are lots of books for learning javascript.
Copy link to clipboard
Copied
Hi William -
Sorry for delay - we are working on a release and that took precedence over everything else for a few days... first - thank you for all your assistance. I do have an issue, but I'm sure it's me doing something wrong. I'm getting a run time error...
This is my original script:
document.write("<a href=\"mailto:infomoto.help@gmail.com?subject=" + document.title + " section of the PDM1 KB\">infomoto.help@gmail.com</a>");
So I replace it with your Java Script, and yes - I still have the red box in the WYSIWYG page
+d++ocument.write('<a href="javascript:void(0);" onclick="Mailto(\''+document.title+'\')" >youremail</a>');+
The HTML looks like this:
Problem with this page? Click here: <script>+d++ocument.write('<a href="javascript:void(0);" onclick="Mailto(\''+document.title+'\')" >@infomoto.help@gmail.com</a>');+</script>
to provide feedback</p>
When I preview it, I get this error:
A Runtime Error has occurred. Do you wish to Debug?
Line 33 Error: Expected ';'
If I publish, I just get a plus sign for the email -
Then, if I add the additional info in the HTML page just before script, I get this error when previewing (after saving) - Line 35 Error: Syntax Error and Line 40 Error: Syntax Error:
Problem with this page? Click here:
+<script type="text/javascript">+
+function Mailto(subject) {+
+ var HTML = 'mailto:mailto:infomoto.help@gmail.com?subject='+subject+'+ section of the PDM1 KB';
+window.open(HTML,'Email');+
+}
+
+</script>+
<script>+d++ocument.write('<a href="javascript:void(0);" onclick="Mailto(\''+document.title+'\')" >@infomoto.help@gmail.com</a>');+</script>
to provide feedback</p>
My WYSIWYG page does have two red boxes, but they both have plus signs in front of them (which is different than it was with my original script). And if I publish, I just get two plusses:
Any suggestion?
Thank you,
Anahid
Copy link to clipboard
Copied
Hi,
Your code is hard to read because of the forum markup. Please post a screenshot of the code if the following doesn't help.
In your new code you have "d++ocument.write". Remove the two +, so it reads: "document.write".
Greet,
Willam
Copy link to clipboard
Copied
William -
You rock.
I sincerely thank you for your assistance in getting this email to work. Unfortunately I had made the mistake of using the code in the email - not here on the forum, which is why the d++ocument was showing.
I really think it's wonderful of you (and others like Rick, who has helped me before) to assist people like me. I always try to pass it forward and assist where I can, but you guys are truly inspirational!
Is there any place you know of for decent online / self paced java script training? I'd love to really learn about this.
Thanks again!
Anahid
Copy link to clipboard
Copied
Share the knowledge!
For JavaScript, W3Schools has lots of information, but it doesn't provide good tutorials. Also try http://www.tizag.com/javascriptT/
Greet,
Willam