PDA

View Full Version : TinyBox


olicorse
06-07-2011, 09:02 PM
Hi guys,

I am trying to update the 'tinybox.js' functionality of this website but it doesn't work when I preview it on a browser. I haven't got a domain to upload it to so am just testing it locally. Does this function just not work on local servers or is there a problem with my code?

Cheers!

<table id="popupNames">
<tr>
<td width="174" id="senior">Senior Internal Auditor</td>
<td width="114" class="salary">Buenos Aires, Argentina</td>
</tr>
<tr>
<td id="it">Senior Internal Auditor </td>
<td class="salary">Mexico City, Mexico</td>
</tr>

</table>

<p>or <a href="mailto:emailaddress">send your CV to us</a>.

<script type="text/javascript">
T$('senior').onclick = function(){TINY.box.show('vacancies-senior-internal-auditor_ar.html', 1,0,0,1)}
T$('it').onclick = function(){TINY.box.show('vacancies-senior-internal-auditor_mx.html', 1,0,0,1)}

}
function senior() {
TINY.box.show('vacancies-senior-internal-auditor_ar.html',1,0,0,1)
}
function it() {
TINY.box.show('vacancies-senior-internal-auditor_mx.html',1,0,0,1)
}
</script>

johnMoss
06-08-2011, 02:11 AM
It's difficult to evaluate without being able to see the whole picture. As to issues with javascript functions without a server, yes, that happens. Do you not have a way of loading this into another hosted site that you can access?
I've done that before, and specifically for purposes here. All you have to do is create a directory on the host. At which point we can see the whole shebang and makes solving the problem much easier.

domedia
06-08-2011, 12:48 PM
Are you using Tinybox 2, the most recent version?

JavaScript runs in the browser. Unless you're doing something dynamic (ajax) it should work locally. Tinybox does not need to run on a server to test it.

Tinybox requires their tinybox.js to be loaded in the head part of the document, make sure this is set.

Then delete all the JavaScript you have in the code above, and start off with their example code and modify from there, knowing what each edit is when you make it.