Jump to content

V1ktor

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

V1ktor's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ahh FINALLY! We got to the bottom of this. I had to move vars around into their order for PayScale to read them properly (job, city, state, country), but it works! Thanks for sticking around and helping me solve this puzzle.
  2. Hmmm didn't think about that. It seems like the $title is a link... so if it pulls Accountant, it's a link to that job and not just a word. I will find out if there's another value I can pull.
  3. Ahh wasn't paying attention. $job is $title. $state and $country are static, I can set them to what I need. $city and $title are pulled from database. When I changed $job to $title, it began doing what it did in the beginning... breaking onClick and just displaying those values... just like in that screenshot I showed earlier. I'm not sure its causing that.
  4. Nope, for some reason it doesn't work when I comment out those vars. Here's the code in that file: <?php if ( ! ( defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); } global $_config; $make_national=$_config['make_jobs_national']; /* * 1:hepsini göster * 2:şirketin seçmesine izin ver; * 3:hepsini gizle * */ $hide=$_config['hide_company']; ?> <?php echo $simple_search_box_wide;?><br /> <?php echo $subcats;?> <?php if ($job_count==0) { echo _lkn_error_no_job; }else {?> <div style="padding-top: 20px;"> <div id="middleleftwidgetcontainer"> <div class="jobsfoundnosuggs" > <h1 style="margin: 15px 0px 8px;" class="searchInfo"><?php echo $job_count;?> - <?php echo temizleSlash($cat_name);?> <?php echo _lkn_jobs?></h1> </div> </div> <div style="clear: both;"></div> </div> <?php //kategoriye ait işlerin yazırılması başladı?> <div class="jl_wrap_div grad"> <table cellspacing="0" border="0" style="border-collapse: collapse;" class="jl_tbl"> <tbody> <tr id="gradtitle"> <th align="left" style="padding: 3px;padding-left: 15px;"><?php echo _lkn_job;?></th> <?php if ($hide!='3') {?> <th align="left" style="padding: 3px;"><?php echo _lkn_company;?></th> <?php }?> <?php if ($make_national=='0') {?> <th align="left" style="padding: 3px;"><?php echo _lkn_job_country;?></th> <?php }?> <th align="left" style="padding: 3px;"><?php echo _lkn_job_location;?></th> <th align="left" style="padding: 3px;"><?php echo _lkn_created;?></th> <th align="left" style="padding: 3px;">Salary</th> </tr> <?php $k=1; foreach ($rows as $row) { //print_r($row); $title=temizleSlash($row->title); $id=$row->id; $published=$row->published; $alias=$row->alias; $company_name=temizleSlash($row->company_name); $company_alias=$row->company_alias; $company_id=$row->company_id; $created=$row->created; $created=lknDate::formatDate($created); $job_location=$row->job_location; $city=$row->city; $state=$row->state; $location=array(); if ($city!='') { $location[]=$city; } if ($state!='') { $location[]=$state; } if (count( $location )>0) { $location= implode( ' , ', $location ); }else { $location= ' - '; } if ($hide=='2') { //şirketin seçmesine izin verilmiş $hide_company_name=$row->hide_company_name; }elseif ($hide=='1'){ $hide_company_name='0'; }elseif ($hide=='3'){ $hide_company_name='1'; } if ($hide_company_name=='1') { $company_name=_lkn_job_company_name_is_hidden; }else { $link_company="index.php?option=com_jobs&task=detail_company&id=$company_id:$company_alias" . $Itemid; $link_company=lknSef::url($link_company); $company_name="<a href=\"$link_company\">$company_name</a>"; } $link_job="index.php?option=com_jobs&task=detail_job&id=$id:$alias" . $Itemid; $link_job=lknSef::url($link_job); $title="<a href=\"$link_job\" class=\"jt\">$title</a>"; if ($k=='1') { $class='jl_odd_row'; }else { $class='jl_even_row'; } ?> <tr class="<?php echo $class;?>"> <td align="left"><?php echo $title;?></td> <?php if ($hide!='3') {?> <td align="left"><?php echo $company_name; ?></td> <?php }?> <?php if ($make_national=='0') {?> <td align="left"><?php echo $job_location;?></td> <?php }?> <td align="left"><?php echo $location;?></td> <td align="left"><?php echo $created; ?></td> <td align="left"> <script type="text/javascript" src="http://www.payscale.com/js/psextension.js"></script> <script type="text/javascript"> PayScaleExtension.affiliateId=''; PayScaleExtension.ServiceURL='http://www.payscale.com'; PayScaleExtension.jobListing = false; PayScaleExtension.backgroundColor = '#9a0000'; PayScaleExtension.textColor = '#ffffff'; PayScaleExtension.init(); </script> <?php //$job = 'Registered Nurse (RN)'; //$state = 'Seattle'; //$city = 'Washington'; //$contry = 'United States'; echo "<a href=\"http://www.payscale.com\" title=\"Research Salary at PayScale\" onclick=\"javascript:PayScaleExtension.displaySalaryCalculator('$job', '$state', '$city', '$contry');return false;\"> <img src=\"http://www.payscale.com/images/research_salary_bug.gif\" alt=\"PayScale\" width=\"109\" height=\"23\" border=\"0\" /></a>"; ?> </td> </tr> <?php $k=3-$k; } ?> </tbody> </table> </div> <?php //kategoriye ait işlerin yazırılması bitti?> <?php //sayfalama linkleri başladı?> <div style="margin: 5px; padding: 5px;"> <?php echo $paging_links;?> </div> <?php //sayfalama linkleri bitti?> <?php }?>
  5. Ok, I see. It works now. But, you redefined vars to the static options. In that file I already have php setup to call $title, $city, $state from a database. How can I connect that inside PayScale onClick event. Thanks for your help, really appreciate it.
  6. Inserting php vars on their own with everything inside echo does the same thing, it breaks the code by displaying values next to the image button. Refer to image example to see what I mean. They need to stay inside onClick so when someone clicks on the image it opens window with information based on those values.
  7. Ahh why it has to be pain in the butt. It still doesn't work. I tried removing php variables from onClick and run it like that... it works fine. Seems like having php variables inside onClick breaks it. Maybe convert php variable to js variable? That, technically, could work.
  8. The variables inside onClick shouldn't display on the page next to the image button. This is the original code with static values: onclick="javascript:PayScaleExtension.displaySalaryCalculator('Registered Nurse (RN)', 'Seattle', 'Washington', 'United States');return false;"> I need to insert php variables inside onclick so they can be populated from database. The table I have setup already pulls $title and $city from database. All I need to figure out is how to insert them inside onClick without them breaking the code. See the image for what it looks like with: <?php $info = array("'$title'",",","'$city'",",","'$state'"); $info = implode(', ', $info); echo "<a href=\"http://www.payscale.com\" title=\"Research Salary at PayScale\" onclick=\"javascript:PayScaleExtension.displaySalaryCalculator($info , 'United States');return false;\"> <img src=\"http://www.payscale.com/images/research_salary_bug.gif\" alt=\"PayScale\" width=\"109\" height=\"23\" border=\"0\" /></a>" ?> [attachment deleted by admin]
  9. Still nothing. I realized I just need title and city variables passed, state is the same. Can I use js variables instead? I'm not sure how to insert them inside onClick though. <script type="text/javascript"> // <![CDATA[ var city = "' . $city . '"; var title = "' . $title . '"; // ]]> </script> <a href="http://www.payscale.com" title="Research Salary at PayScale" onclick="javascript:PayScaleExtension.displaySalaryCalculator(title,city,'New York','United States');return false;"> <img src="http://www.payscale.com/images/research_salary_bug.gif" alt="PayScale" width="109" height="23" border="0" /></a>
  10. Hey, thanks for reply. But still nothing, it displays it right next to the image link. Here's full code that I'm using: <?php $info = array("'$title'",",","'$city'",",","'$state'"); $info = implode(', ', $info); echo "<a href=\"http://www.payscale.com\" title=\"Research Salary at PayScale\" onclick=\"javascript:PayScaleExtension.displaySalaryCalculator($info , 'United States');return false;\"> <img src=\"http://www.payscale.com/images/research_salary_bug.gif\" alt=\"PayScale\" width=\"109\" height=\"23\" border=\"0\" /></a>" ?> This is how it displays it: Sales Representative', ,, 'Greece', ,, 'New York' , 'United States');return false;"> Plus image link next to it. Thanks for your help.
  11. I need to display 3 php values inside onClick event. I tried code below, but clearly I'm missing something. It pulls values from db and displays them instead of staying within onClick. <?php $info = array("'$title'",",","'$city'",",","'$state'"); ?> onclick="javascript:PayScaleExtension.displaySalaryCalculator(<?php echo implode(', ', $info); ?> , 'United States');return false;"> This is what I'm trying to accomplish once it pulls values from db: onclick="javascript:PayScaleExtension.displaySalaryCalculator('Registered Nurse (RN)', 'Seattle', 'Washington', 'United States');return false;"> Thanks.
  12. NICE! It works. I didn't even see the difference until you pointed out. Thanks man!
  13. Ok. great, now it works. I don't know what I was doing haha. Here's the new issue, getting recent date. I tried using values that comiconline uses ORDER BY and DESC LIMIT, but it pulls up another date... not the one I need. $getinfofromissues = mysql_query("SELECT * FROM `issues` ORDER BY 'date' DESC LIMIT 1;"); issues table does have "date" column, but I guess I'm missing something that it doesn't work for this but works for other. Thanks again.
  14. Exactly. I need to add that. My attempts were resulting in errors.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.