I'm using the gadget in conjunction with an activity window of a messenger bot. The user can check out a page on an accom, then email it's details to a buddy using the gadget.
Unfortunately, I'm having a bit of difficult with the last hurdle. The gadget loads fine, I can sign in, get contact details etc, but when I send the details required (name, email) back to the page, they are always "undefined".
Any ideas what I'm doing wrong
Example page here:http://www.comtecsearch.com/Accommodation.aspx Query=South+Beach+Miami&LoadPage=5&SendEmail=true
The idea is that when the user clicks send details, the page submits itself and loads up again with the emails having been sent. Currently I'm getting errors as the data is undefined (and I haven't yet done a graceful error report ;-)).
That's what the channel.htm does - it does its work in the page load event then redirects the browser to about:blank. This is necessary to reset the trigger for the next event, since some browsers won't fire a page load event if the new URL is the same as the previous URL.
To download the channel.htm file, open the URL in something other than a browser, such as Notepad. Start Notepad, File: Open, and type in http://dev.live.com/scripts/AddressManager/channel.htm. Then File: Save As and save it locally.
You've got a typo in your source code: "names += p_contacts.names", but the field on the p_contacts[] data is "name", with no s.
Also, keep in mind that if the contact info for a particular contact does not have a value for a requested field, that field will not be defined on the returned data object. For example, if you ask for (name,email, country) and the user selects a contact which doesn't contain any country info, the country field will not be defined in the return data object.
This makes data handling a little more complicated for your code. I'll work on smoothing it out a little, perhaps by defining the requested fields on the returned objects even if their value is blank.
Display seems to be ok, I can select contact, but when I send information, nothing happen. I think the issue is from the channel.htm file, cause with or without, the behavior is the same. The channel.htm file is in the same location that my "test.php".
Is it a problem from my provider Do you have a way to display error message to debug this
It looks like there might be problems with the quote chars on some of your strings, too. Make sure they're plain quotes, not fancy backquotes. MSWord has a tendency to get fancy on quotes, which really screws up program code.
There's a typo in our sample code! Thanks for reporting it!
The expression document.getElementById("ContactGadgetSite") should be document.getElementById("ContactsGadgetSite"). Note the "s" in the middle. The string has to match the ID of the DIV element defined earlier.
Don't get it
Cla82
Kenico,
Congratulations! Looks great! Let us know when you get it incorporated into your site(s)!
-Danny
jkgarner
whats wrong
vrushali
Hi
Cool gadget!
I'm using the gadget in conjunction with an activity window of a messenger bot. The user can check out a page on an accom, then email it's details to a buddy using the gadget.
Unfortunately, I'm having a bit of difficult with the last hurdle. The gadget loads fine, I can sign in, get contact details etc, but when I send the details required (name, email) back to the page, they are always "undefined".
Any ideas what I'm doing wrong
Example page here:http://www.comtecsearch.com/Accommodation.aspx Query=South+Beach+Miami&LoadPage=5&SendEmail=true
The idea is that when the user clicks send details, the page submits itself and loads up again with the emails having been sent. Currently I'm getting errors as the data is undefined (and I haven't yet done a graceful error report ;-)).
Cheers
Aled
LonelyPixel
Thomasarg,
That's what the channel.htm does - it does its work in the page load event then redirects the browser to about:blank. This is necessary to reset the trigger for the next event, since some browsers won't fire a page load event if the new URL is the same as the previous URL.
To download the channel.htm file, open the URL in something other than a browser, such as Notepad. Start Notepad, File: Open, and type in http://dev.live.com/scripts/AddressManager/channel.htm. Then File: Save As and save it locally.
-Danny
robhare
epsilon_ro
Andreas_
Hi Jeek,
You've got a typo in your source code: "names += p_contacts
.names", but the field on the p_contacts[] data is "name", with no s.
Also, keep in mind that if the contact info for a particular contact does not have a value for a requested field, that field will not be defined on the returned data object. For example, if you ask for (name,email, country) and the user selects a contact which doesn't contain any country info, the country field will not be defined in the return data object.
This makes data handling a little more complicated for your code. I'll work on smoothing it out a little, perhaps by defining the requested fields on the returned objects even if their value is blank.
-Danny
boldeagle
I meet some trouble too:
http://kenico.free.fr/livemess/test.php
Display seems to be ok, I can select contact, but when I send information, nothing happen. I think the issue is from the channel.htm file, cause with or without, the behavior is the same. The channel.htm file is in the same location that my "test.php".
Is it a problem from my provider Do you have a way to display error message to debug this
Regards,
Kenico
Michael Morris
IZON,
Your HTML is still malformed. You have two <script> blocks in the body, but only one </script>
Run your HTML through a validator to help find syntax errors. Like this:
http://validator.w3.org/check uri=http%3A%2F%2Fwww.izonnet.se%2Fmsntest.php%2F&charset=windows-1250&doctype=HTML+4.01+Transitional&outline=1&sp=1
It looks like there might be problems with the quote chars on some of your strings, too. Make sure they're plain quotes, not fancy backquotes. MSWord has a tendency to get fancy on quotes, which really screws up program code.
-Danny
R1ZWAN
IZON,
The script in your msntest.php is never executing. I think it's because your HTML is broken - you've got <html> <body> <head> ... </head> blah blah.
The head should come before the body, not inside the body. <html> <head>...</head> <body>...</body> </html>
-Danny
hrubesh
My apologies, I didn't realise this was on topic.
RobertMC
Gadget embedded !!!
Here: http://motard.martial.free.fr/pages_php/main.php
The goal is to send an e-mail to msn contacts, just to say "Hey this is a new site, shared by one of your MSN contact".
Waiting for new idea, but now the most difficult is done
PrashanthBlog
IZON,
There's a typo in our sample code! Thanks for reporting it!
The expression document.getElementById("ContactGadgetSite") should be document.getElementById("ContactsGadgetSite"). Note the "s" in the middle. The string has to match the ID of the DIV element defined earlier.
Give that a try, should work much better.
-Danny
Leo Liu
Ok, sry, I found: I forgot the div (<div id="ContactsDisplay"></div>) to display the result
It works perfectly, great !