Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

php javascript widgets

Posted on 2008-10-07
7
Medium Priority
?
313 Views
Last Modified: 2013-12-13
hi guys ,
             i want to create the widgets like on this page
http://affiliate.workcircle.com/login
please click on that page and look at that 4 types of widgets .

add to my blogger , typepad,snipperoo
html widgets for my website


please guide me how to do that ?
0
Comment
Question by:jamie_2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
7 Comments
 
LVL 82

Expert Comment

by:hielo
ID: 22660283
You are better off contacting support at workcircle.com since most likely you need to create an account with them so you get paid. Following the links on that site (without registering) do not seem to give you anything to install on your server.

0
 

Author Comment

by:jamie_2008
ID: 22660372
no , i dont  .. i wanna know .. how to create the widgets  ..
i m not concerned with the affiliate system ..

i want to know ..how to make it this code ?

<script type="text/javascript">
<!-- Feel free to change this -->
wc_background_color = "#ffffff";
wc_width = "150px";
wc_font = "10px verdana, arial, helvetica, sans-serif"
wc_font_color = "#996633";
wc_link_color = "#336699";
wc_border_color = "#D1E0F0";
wc_title_font = "12px Arial, Helvetica, Sans serif";
wc_title_font_color = "#ffffff";
wc_title_background_color = "#6699CC";
wc_title = 'Top UK Jobs';
<!-- Do not change this -->
wc_affiliate_id = 0;
</script>
<script type="text/javascript" src="http://widget.workcircle.com/?q=software%20engineer&n=5&a=0&i=1"></script>

above is the core part of code that i need to know ,,how it works ..
<!-- Workcircle Widget Copyright (c) 2007 All Rights Reserved. use permitted only on terms which can be viewed at http://www.workcircle.com/affiliate-terms -->
<noscript><a href="http://www.workcircle.com">Jobs</a> from Workcircle.com</noscript>
<script type="text/javascript">
<!-- Feel free to change this -->
wc_background_color = "#ffffff";
wc_width = "150px";
wc_font = "10px verdana, arial, helvetica, sans-serif"
wc_font_color = "#996633";
wc_link_color = "#336699";
wc_border_color = "#D1E0F0";
wc_title_font = "12px Arial, Helvetica, Sans serif";
wc_title_font_color = "#ffffff";
wc_title_background_color = "#6699CC";
wc_title = 'Top UK Jobs';
<!-- Do not change this -->
wc_affiliate_id = 0;
</script>
<script type="text/javascript" src="http://widget.workcircle.com/?q=software%20engineer&n=5&a=0&i=1"></script>
<!-- PLEASE DO NOT EDIT THIS BIT -->
<div align="center" style="padding-top:3px; height:27px; background-color:#E8F0F7; border:1px solid #D1E0F0"><a href="http://www.workcircle.com?a=0" target="_blank"><img src="http://widget.workcircle.com/images/logo-widget2.gif" width="106" height="26" border="0" alt="Workcircle - marketing jobs, london jobs, law jobs, engineering jobs, financial jobs, all the top jobs!" /></a></div>
</div>
<!-- THANK YOU! -->

Open in new window

0
 
LVL 82

Expert Comment

by:hielo
ID: 22661073
on the code you pasted, you have this:

<script type="text/javascript" src="http://widget.workcircle.com/?q=software%20engineer&n=5&a=0&i=1"></script>
 
if your open the url:
http://widget.workcircle.com/?q=software%20engineer&n=5&a=0&i=1
 
you will notice that it sends back javascript code which in turn uses document.write statements to create HTML markup. The variables/settings that you have above:
 
wc_background_color = "#ffffff";
wc_width = "150px";
wc_font = "10px verdana, arial, helvetica, sans-serif"
wc_font_color = "#996633";
wc_link_color = "#336699";
wc_border_color = "#D1E0F0";
wc_title_font = "12px Arial, Helvetica, Sans serif";
wc_title_font_color = "#ffffff";
wc_title_background_color = "#6699CC";
wc_title = 'Top UK Jobs';
<!-- Do not change this -->
wc_affiliate_id = 0;
 
is used on that HTML that is created dynamically. It controls the look and feel of that markup (fonts,colors).
 
Also, on the url you have:
q=software%20engineer&n=5&a=0&i=1
 
which the server on that site uses to search their db for jobs that meet that criteria.

Open in new window

0
 

Author Comment

by:jamie_2008
ID: 22669379
ok , i understand what the following code does ..

but i want to know ..how they generate the javascript code .?? this is the methodology that i want to know how it works ...


basically .. i want to code the javascript widgets  .. i have same type of website ..jobs search engine ..

i want to make a widget that everyone could use it on their website .. but how to do it ?




<script type="text/javascript" src="http://widget.workcircle.com/?q=software%20engineer&n=5&a=0&i=1"></script>
 
if your open the url:
http://widget.workcircle.com/?q=software%20engineer&n=5&a=0&i=1

Open in new window

0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 1500 total points
ID: 22740437
They have a server process (http://widget.workcircle.com/?q=software engineer&n=5&a=0&i=1) that does


header("content-type: text/javascript");
// some sql here
print "document.write('<table cellspacing=\"0\" cellpadding=\"5\">');\ndocument.write('<tr><td style=\"font:' + wc_font + ';\"><a target=\"_blank\" href=\"http://www.workcircle.com/?search=1&amp;query=software%20engineer&amp;j=23956116&amp;a=' + wc_affiliate_id + '\".... ";

Open in new window

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question