- Web developer pastes my javascript code in their HTML
- My widget gets the page’s url, and on the server, looks up the URL’s info, and returns a widget for that page.
How can I create that javascript?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know of any tutorial, but this is what you could do.
There are 2 pieces required for this to work.
The first script will need to get the domain properties and pass those as url paramaters when requesting the second script.
Then on the server (in this case i’ll use php), you just get the url paramater and do what you need with it. Just as an example I’ll make the new script run an alert function with the domain as its value.
Thats it 🙂
So your html page will look something like this.
If you need more clarification leave a comment. Also I have not tested this code, so there may be a few bugs, but the method is correct.