Solved

php javascript widgets

Posted on 2008-10-07
7
310 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 500 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

705 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